Skip to content

Commit

Permalink
fix: Expandable title prop
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonmt committed Aug 18, 2023
1 parent 615e1a4 commit 2f31743
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/cuddly-shirts-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vygruppen/spor-react": patch
---

Fix Expandable title
4 changes: 2 additions & 2 deletions packages/spor-react/src/accordion/Expandable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccordionProps, "title"> & {
/** The hidden content */
children: React.ReactNode;
/** The title that's shown inside the toggle button */
Expand Down Expand Up @@ -62,7 +62,7 @@ export const Expandable = ({
);
};

export type ExpandableItemProps = AccordionItemProps & {
export type ExpandableItemProps = Omit<AccordionItemProps, "title"> & {
/** The hidden content */
children: React.ReactNode;
/** The title that's shown inside the toggle button */
Expand Down

0 comments on commit 2f31743

Please sign in to comment.