Skip to content

Commit

Permalink
feat(ui/components): styles의 makeData 변경사항 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
sukvvon committed Aug 16, 2024
1 parent 974e3de commit 2a2e340
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
27 changes: 12 additions & 15 deletions packages/ui/src/components/button/button.styles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { alignItems, display } from '../../styles';
import { archivePalette, globalVars, inherencePalette } from '../../theme.css';

const base = style([
display.inlineFlex,
display['inline-flex'],
alignItems.center,
{
cursor: 'pointer',
Expand All @@ -18,25 +18,22 @@ const base = style([
},
]);

const colorSchemeVar = createVar();
const colorVar = createVar();

const colorSchemePalette = {
const colorPalette = {
...archivePalette,
...inherencePalette,
};

const colorScheme = styleVariants(
colorSchemePalette,
(_, colorSchemePaletteKey) => ({
vars: { [colorSchemeVar]: globalVars.palette[colorSchemePaletteKey] },
}),
);
const color = styleVariants(colorPalette, (_, colorPaletteKey) => ({
vars: { [colorVar]: globalVars.palette[colorPaletteKey] },
}));

export const buttonVariants = recipe({
base,

variants: {
colorScheme,
color,
justify: {
center: {
justifyContent: 'center',
Expand All @@ -47,13 +44,13 @@ export const buttonVariants = recipe({
},
variant: {
solid: {
backgroundColor: colorSchemeVar,
border: `1px solid ${colorSchemeVar}`,
backgroundColor: colorVar,
border: `1px solid ${colorVar}`,
color: globalVars.palette.white,
},
outline: {
backgroundColor: 'inherit',
border: `1px solid ${colorSchemeVar}`,
border: `1px solid ${colorVar}`,
color: globalVars.palette.gray1000,
},
},
Expand Down Expand Up @@ -83,7 +80,7 @@ export const buttonVariants = recipe({
},

defaultVariants: {
colorScheme: 'white',
color: 'white',
justify: 'center',
variant: 'solid',
weight: 'regular',
Expand All @@ -94,7 +91,7 @@ export const buttonVariants = recipe({
compoundVariants: [
{
variants: {
colorScheme: 'black',
color: 'black',
variant: 'solid',
},
style: {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/layout/flex.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const flexEnumVariants = recipe({
display: {
none: display.none,
flex: display.flex,
inlineFlex: display.inlineFlex,
'inline-flex': display['inline-flex'],
},
direction: flexDirection,
align: alignItems,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/tag/tag.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const color = styleVariants(

const base = style([
colorClass,
display.inlineFlex,
display['inline-flex'],
alignItems.center,
flexShrink.none,
textWrap.nowrap,
Expand Down

0 comments on commit 2a2e340

Please sign in to comment.