Skip to content

Commit c7d5c7f

Browse files
authored
type: accept string in the aspectRatio property of flex image and flex icon (#212)
* type: accept string in the aspectRatio property of flex image and flex icon * type: remove the iterate string union type in aspectRatio
1 parent d6001da commit c7d5c7f

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

lib/types.ts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,9 +1181,12 @@ export type FlexIcon = {
11811181
| "4xl"
11821182
| "5xl";
11831183
/**
1184-
* Aspect ratio of the icon. The default value is `1:1`.
1184+
* Aspect ratio of the icon. `{width}:{height}` format.
1185+
* The values of `{width}` and `{height}` must be in the range 1–100000.
1186+
* `{height}` can't be more than three times the value of `{width}`.
1187+
* The default value is `1:1`.
11851188
*/
1186-
aspectRatio?: "1:1" | "2:1" | "3:1";
1189+
aspectRatio?: string;
11871190
} & Offset;
11881191

11891192
/**
@@ -1262,22 +1265,12 @@ export type FlexImage = {
12621265
| "5xl"
12631266
| "full";
12641267
/**
1265-
* Aspect ratio of the image.
1268+
* Aspect ratio of the image. `{width}:{height}` format.
1269+
* Specify the value of `{width}` and `{height}` in the range from 1 to 100000. However,
1270+
* you cannot set `{height}` to a value that is more than three times the value of `{width}`.
12661271
* The default value is `1:1`.
12671272
*/
1268-
aspectRatio?:
1269-
| "1:1"
1270-
| "1.51:1"
1271-
| "1.91:1"
1272-
| "4:3"
1273-
| "16:9"
1274-
| "20:13"
1275-
| "2:1"
1276-
| "3:1"
1277-
| "3:4"
1278-
| "9:16"
1279-
| "1:2"
1280-
| "1:3";
1273+
aspectRatio?: string;
12811274
/**
12821275
* Style of the image. Specify one of the following values:
12831276
*

0 commit comments

Comments
 (0)