feat(layout-components): add Grid component and rethink other#2509
feat(layout-components): add Grid component and rethink other#2509
Conversation
|
🎭 Component Tests Report is ready. |
fc09da5 to
ab32c0a
Compare
|
Preview is ready. |
|
🎭 Component Tests Report is ready. |
| } | ||
|
|
||
| export interface FlexStyleProps | ||
| extends Omit<BoxAlignmentStyleProps, 'gap' | 'justifyItems' | 'placeItems'> { |
There was a problem hiding this comment.
Why are we omiting these two, justifyItems and placeItems?
There was a problem hiding this comment.
they don't make sense for flex.
| for (const [key, value] of Object.entries(borderStyleProps)) { | ||
| if (style[key as keyof typeof borderStyleProps]) { | ||
| style[value] = 'solid'; | ||
| style.boxSizing = 'border-box'; |
There was a problem hiding this comment.
Why are we doing this? Setting boxSizing might be surprising for user
There was a problem hiding this comment.
In my opinion, in most cases it makes sense to measure elements within visible boundaries. The user can set the desired box-sizing.
| } | ||
|
|
||
| const spacingRe = /^spacing-(\d+|half)$/; | ||
| export function getSpacingValue(value: unknown) { |
There was a problem hiding this comment.
Shouldn't we also add support for multiple values like in native property: gap: <'row-gap'> <'col-gap'>?
There was a problem hiding this comment.
it complicates things. The User can use explicit values e.g. 8px 16px or explicit props columnGap, rowGap
No description provided.