From 104631051277daf89c7fef6043ed1e17abdff3c3 Mon Sep 17 00:00:00 2001 From: Jamie Howard Date: Mon, 7 Oct 2024 16:18:48 +0100 Subject: [PATCH 1/2] feat(accordion): pass optional props to icon --- .../design-system/src/components/Accordion/Accordion.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/design-system/src/components/Accordion/Accordion.tsx b/packages/design-system/src/components/Accordion/Accordion.tsx index 0b52dfc1b..c8a668d50 100644 --- a/packages/design-system/src/components/Accordion/Accordion.tsx +++ b/packages/design-system/src/components/Accordion/Accordion.tsx @@ -121,11 +121,12 @@ interface TriggerProps extends Omit>; + iconProps?: React.SVGProps; } const Trigger = React.forwardRef( - ({ caretPosition = 'left', description, icon: Icon, children, ...restProps }, forwardedRef) => { + ({ caretPosition = 'left', description, icon: Icon, iconProps, children, ...restProps }, forwardedRef) => { const { size } = useAccordion('Trigger'); return ( @@ -138,7 +139,7 @@ const Trigger = React.forwardRef( {Icon && size === 'S' ? ( - + ) : null} From 8bd760b3ad7c06e0da5f2dccd60762f1c1cf2ef3 Mon Sep 17 00:00:00 2001 From: Jamie Howard Date: Mon, 7 Oct 2024 16:21:16 +0100 Subject: [PATCH 2/2] chore: changeset --- .changeset/stale-apes-approve.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/stale-apes-approve.md diff --git a/.changeset/stale-apes-approve.md b/.changeset/stale-apes-approve.md new file mode 100644 index 000000000..424a4eac7 --- /dev/null +++ b/.changeset/stale-apes-approve.md @@ -0,0 +1,5 @@ +--- +'@strapi/design-system': minor +--- + +pass props to icons in accordion triggers