Merged in refactor-tripadvisor-chip (pull request #3404)

Refactor TripadvisorChip

* feat: create new StaticChip componeny

* refactor tripadvisor chip to use ChipStatic

* refactor: use TripadvisorChip everywhere

* fix: use withChipStatic


Approved-by: Erik Tiekstra
This commit is contained in:
Matilda Landström
2026-01-23 12:19:37 +00:00
parent 5171d2d4d7
commit ae77fa3028
18 changed files with 129 additions and 194 deletions

View File

@@ -9,16 +9,10 @@ const meta: Meta<typeof TripAdvisorChip> = {
rating: {
control: { type: "number", min: 0, max: 5, step: 0.1 },
},
size: {
control: { type: "select" },
options: ["default", "small"],
},
color: {
control: { type: "select" },
options: ["default", "subtle"],
},
wrapper: {
control: { type: "boolean" },
control: { type: "select" },
options: ["x05", "x15", "x2"],
},
},
}
@@ -29,35 +23,40 @@ type Story = StoryObj<typeof TripAdvisorChip>
export const Default: Story = {
args: {
rating: 4.5,
size: "default",
color: "default",
wrapper: false,
},
}
export const WithWrapper: Story = {
export const WithSmallWrapper: Story = {
args: {
rating: 4.5,
size: "default",
color: "default",
wrapper: true,
wrapper: "x05",
},
}
export const WithMediumWrapper: Story = {
args: {
rating: 4.5,
wrapper: "x15",
},
}
export const WithLargeWrapper: Story = {
args: {
rating: 4.5,
wrapper: "x2",
},
}
export const Small: Story = {
args: {
rating: 4.5,
size: "small",
color: "default",
wrapper: true,
size: "sm",
},
}
export const Subtle: Story = {
args: {
rating: 4.5,
size: "default",
color: "subtle",
wrapper: false,
color: "Subtle",
},
}