-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(shared/components/flex): flex 컴포넌트에 grow, shrink, basis 속성 추가, i…
…nline vars 사용 (#140) * feat(shared/components/flex/flex.styles.css.ts): createVars를 사용한 값으로 변경 * feat(shared/components/flex/flex.tsx): grow, shrink, basis 속성 추가, lnline vars를 사용한 것으로 변경
- Loading branch information
Showing
2 changed files
with
48 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,26 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
import { createCSSPropertyStyleVariants } from './create-css-property-style-variants'; | ||
import { createVar, style } from '@vanilla-extract/css'; | ||
|
||
export const flexBase = style({ | ||
display: 'flex', | ||
}); | ||
|
||
export const flexJustify = createCSSPropertyStyleVariants('justifyContent', [ | ||
'-moz-initial', | ||
'center', | ||
'end', | ||
'flex-end', | ||
'flex-start', | ||
'inherit', | ||
'initial', | ||
'left', | ||
'normal', | ||
'revert', | ||
'revert-layer', | ||
'right', | ||
'space-around', | ||
'space-between', | ||
'space-evenly', | ||
'start', | ||
'stretch', | ||
'unset', | ||
]); | ||
export const flexJustify = createVar(); | ||
|
||
export type FlexJustify = keyof typeof flexJustify; | ||
export const flexAlign = createVar(); | ||
|
||
export const flexAlign = createCSSPropertyStyleVariants('alignItems', [ | ||
'-moz-initial', | ||
'baseline', | ||
'center', | ||
'end', | ||
'flex-end', | ||
'flex-start', | ||
'inherit', | ||
'initial', | ||
'normal', | ||
'revert', | ||
'revert-layer', | ||
'self-end', | ||
'self-start', | ||
'start', | ||
'stretch', | ||
'unset', | ||
]); | ||
export const flexWrap = createVar(); | ||
|
||
export type FlexAlign = keyof typeof flexAlign; | ||
export const flexDirection = createVar(); | ||
|
||
export const flexWrap = createCSSPropertyStyleVariants('flexWrap', [ | ||
'-moz-initial', | ||
'inherit', | ||
'initial', | ||
'nowrap', | ||
'revert', | ||
'revert-layer', | ||
'unset', | ||
'wrap', | ||
'wrap-reverse', | ||
]); | ||
export const flexBasis = createVar(); | ||
|
||
export type FlexWrap = keyof typeof flexWrap; | ||
export const flexShrink = createVar(); | ||
|
||
export const flexDirection = createCSSPropertyStyleVariants('flexDirection', [ | ||
'-moz-initial', | ||
'column', | ||
'column-reverse', | ||
'inherit', | ||
'initial', | ||
'revert', | ||
'revert-layer', | ||
'row', | ||
'row-reverse', | ||
'unset', | ||
]); | ||
export const flexGrow = createVar(); | ||
|
||
export type FlexDirection = keyof typeof flexDirection; | ||
export const flexBase = style({ | ||
display: 'flex', | ||
justifyContent: flexJustify, | ||
alignItems: flexAlign, | ||
flexWrap, | ||
flexDirection, | ||
flexBasis, | ||
flexShrink, | ||
flexGrow, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters