Skip to content

Commit

Permalink
fix: support any string in flexGrow
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Aug 25, 2021
1 parent d6a594c commit 08c5635
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .task/build-csstype.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,11 @@ class ModifiedString extends String {
'FontWeightAbsolute = "bold" | "normal"',
'FontWeightAbsolute = "bold" | "normal" | (string & {})'
).replace(
/DataType\.FontWeightAbsolute \| \(string & \{\}\)/g,
'DataType.FontWeightAbsolute | (string & {})',
'DataType.FontWeightAbsolute'
).replace(
'FlexGrow = Globals | (number & {})',
'FlexGrow = Globals | (number & {}) | (string & {})'
)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/types/css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8117,7 +8117,7 @@ export namespace Property {

export type FlexFlow = "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | OnlyString;

export type FlexGrow = OnlyNumber;
export type FlexGrow = OnlyStringNumeric;

export type FlexShrink = OnlyNumber;

Expand Down
2 changes: 1 addition & 1 deletion packages/react/types/css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8117,7 +8117,7 @@ export namespace Property {

export type FlexFlow = "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | OnlyString;

export type FlexGrow = OnlyNumber;
export type FlexGrow = OnlyStringNumeric;

export type FlexShrink = OnlyNumber;

Expand Down

0 comments on commit 08c5635

Please sign in to comment.