diff --git a/CHANGELOG.md b/CHANGELOG.md index 84c3073bf..0def7d613 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @sikka/hawa +## 0.21.2 + +### Patch Changes + +- Added `chip` prop to `Accordion` item [#SIKKA-5849](https://app.clickup.com/t/613523/SIKKA-5849) + ## 0.21.1 ### Patch Changes diff --git a/components/elements/Accordion.tsx b/components/elements/Accordion.tsx index 5ec27c497..c20583b00 100644 --- a/components/elements/Accordion.tsx +++ b/components/elements/Accordion.tsx @@ -2,12 +2,15 @@ import * as React from "react"; import * as AccordionPrimitive from "@radix-ui/react-accordion"; +import { Chip, ChipTypes } from "@elements/index"; + import { cn } from "../util"; export type AccordionItemProps = { trigger: string; content: string; disabled?: boolean; + chip?: ChipTypes; }; type AccordionProps = { @@ -62,7 +65,14 @@ const Accordion = React.forwardRef< triggerclassNames )} > - {item.trigger} + + {item.trigger} {item.chip && } + {""} - ), - }, + ) + } }, - tags: ["autodocs"], + tags: ["autodocs"] } satisfies Meta; export default meta; @@ -33,12 +34,18 @@ const accordionData: AccordionItemProps[] = [ { trigger: "Another Question", content: "Here's another answer.", - disabled: true, + disabled: true + }, + { + trigger: "Another Question", + content: "Here's another answer.", + chip: { + label: "soon" + } }, { trigger: "Another Question", content: "Here's another answer." }, { trigger: "Another Question", content: "Here's another answer." }, - { trigger: "Another Question", content: "Here's another answer." }, - { trigger: "Another Question", content: "Here's another answer." }, + { trigger: "Another Question", content: "Here's another answer." } ]; const Template = (args: any, globals: any) => { const locale = globals.globals?.locale === "ar" ? "ar" : "en"; @@ -52,7 +59,7 @@ const Template = (args: any, globals: any) => { ); }; export const Default: Story = { - render: Template.bind({}), + render: Template.bind({}) }; export const SeparatedVariant: Story = { render: (args: any, globals: any) => { @@ -70,7 +77,7 @@ export const SeparatedVariant: Story = { /> ); - }, + } }; export const CustomMade: Story = { render: (args: any, globals: any) => { @@ -90,5 +97,5 @@ export const CustomMade: Story = { ); - }, + } };