From 2f317434c320d975a269800e4c23e77335a5b6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Meyer=20T=C3=B8rnquist?= Date: Fri, 18 Aug 2023 14:57:58 +0200 Subject: [PATCH] fix: Expandable title prop --- .changeset/cuddly-shirts-sing.md | 5 +++++ packages/spor-react/src/accordion/Expandable.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/cuddly-shirts-sing.md diff --git a/.changeset/cuddly-shirts-sing.md b/.changeset/cuddly-shirts-sing.md new file mode 100644 index 000000000..e547b0b3a --- /dev/null +++ b/.changeset/cuddly-shirts-sing.md @@ -0,0 +1,5 @@ +--- +"@vygruppen/spor-react": patch +--- + +Fix Expandable title diff --git a/packages/spor-react/src/accordion/Expandable.tsx b/packages/spor-react/src/accordion/Expandable.tsx index e0f43ccb5..2976b33c2 100644 --- a/packages/spor-react/src/accordion/Expandable.tsx +++ b/packages/spor-react/src/accordion/Expandable.tsx @@ -12,7 +12,7 @@ import { Accordion, AccordionProps } from "./Accordion"; import { useAccordionContext } from "./AccordionContext"; type HeadingLevel = "h2" | "h3" | "h4" | "h5" | "h6"; -type ExpandableProps = AccordionProps & { +type ExpandableProps = Omit & { /** The hidden content */ children: React.ReactNode; /** The title that's shown inside the toggle button */ @@ -62,7 +62,7 @@ export const Expandable = ({ ); }; -export type ExpandableItemProps = AccordionItemProps & { +export type ExpandableItemProps = Omit & { /** The hidden content */ children: React.ReactNode; /** The title that's shown inside the toggle button */