Skip to content

Commit

Permalink
feat: add style schema to ImageObjectProps (#554)
Browse files Browse the repository at this point in the history
* feat: add style schema to ImageObjectProps
  • Loading branch information
niktverd authored Sep 13, 2023
1 parent 9bd43f9 commit 5369b42
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/Image/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ const ImageBase = {
},
};

const StyleBase = {
type: 'object',
additionalProperties: false,
required: [],
properties: {
backgroundColor: {type: 'string'},
height: {type: ['string', 'number']},
width: {type: ['string', 'number']},
color: {type: 'string'},
},
};

export const ImageDeviceProps = {
type: 'object',
additionalProperties: false,
Expand Down Expand Up @@ -41,6 +53,7 @@ export const ImageObjectProps = {
type: 'string',
pattern: imageUrlPattern,
},
style: StyleBase,
},
};

Expand Down

0 comments on commit 5369b42

Please sign in to comment.