Skip to content

Commit

Permalink
feat: can use aspect ratio value as string
Browse files Browse the repository at this point in the history
  • Loading branch information
mia committed Dec 28, 2023
1 parent fc56ec6 commit 48bd59a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/vibrant-core/src/lib/props/sizing/sizing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const boxSizingProp = createSystemProp({

const aspectRatioProp = createSystemProp({
property: 'aspectRatio',
transform: (value: number) => ({
transform: (value: number | string) => ({
aspectRatio: value ? value.toString() : value,
}),
});
Expand Down
2 changes: 1 addition & 1 deletion packages/vibrant-core/src/lib/props/sizing/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export type SizingSystemProps = {
minHeight?: ResponsiveValue<number | string | 'auto' | 'fit-content' | 'max-content' | 'min-content'>;
maxHeight?: ResponsiveValue<number | string | 'auto' | 'fit-content' | 'max-content' | 'min-content' | 'none'>;
boxSizing?: 'border-box' | 'content-box';
aspectRatio?: ResponsiveValue<number>;
aspectRatio?: ResponsiveValue<number | string>;
};

0 comments on commit 48bd59a

Please sign in to comment.