Skip to content

Commit

Permalink
feat: fill variant in chip
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbura committed Apr 7, 2024
1 parent 838fb07 commit 3bbce78
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/chip/Chip.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const Chip = recipe({
display: "inline-flex",
alignItems: "center",
color: OnContainer,
backgroundColor: Container,
cursor: "pointer",

selectors: {
Expand Down Expand Up @@ -86,6 +85,14 @@ export const Chip = recipe({
gap: config.space.S200,
},
},
fill: {
Soft: {
backgroundColor: Container,
},
None: {
backgroundColor: "transparent",
},
},
outlined: {
true: {
border: `${config.borderWidth.B400} solid ${ContainerLine}`,
Expand All @@ -95,6 +102,7 @@ export const Chip = recipe({
},
defaultVariants: {
variant: "Surface",
fill: "Soft",
size: "400",
radii: "400",
},
Expand Down
4 changes: 4 additions & 0 deletions src/components/chip/Chip.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export default {
"Critical",
],
},
fill: {
control: "select",
options: ["Soft", "None"],
},
size: {
control: "select",
options: ["400", "500"],
Expand Down
2 changes: 2 additions & 0 deletions src/components/chip/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const Chip = as<"button", ChipProps & css.ChipVariants>(
as: AsChip = "button",
className,
variant,
fill,
size,
outlined,
radii,
Expand All @@ -29,6 +30,7 @@ export const Chip = as<"button", ChipProps & css.ChipVariants>(
className={classNames(
css.Chip({
variant,
fill,
size,
outlined,
radii,
Expand Down

0 comments on commit 3bbce78

Please sign in to comment.