Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom components passed to Accordion header #62

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/lib/Accordion/Accordion.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, CSSProperties, ReactNode, RefObject } from 'react';
import { Component, ComponentType, CSSProperties, ReactNode, RefObject } from 'react';
import { HotKeysProps } from '../HotKeys';
import { DefaultAccordionHeaderProps } from './headers/DefaultAccordionHeader';

Expand All @@ -20,7 +20,7 @@ export type AccordionProps<HeaderProps = DefaultAccordionHeaderProps> = Partial<
/** If the accordion should be disabled */
disabled?: boolean;
/** Supplies a custom header */
header?: ReactNode;
header?: ReactNode | ComponentType<HeaderProps>;
/** Adds props to the header (additional props on the root `<Accordion>` will also be passed) */
headerProps?: Partial<HeaderProps>;
/** The id of the accordion */
Expand Down
Loading