From 6ec16bc15cc78e62cb94e131699625fa5363437c Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 15 Apr 2022 15:34:21 +0200 Subject: chore: add a Widget component --- src/components/molecules/buttons/heading-button.tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/components/molecules/buttons/heading-button.tsx') diff --git a/src/components/molecules/buttons/heading-button.tsx b/src/components/molecules/buttons/heading-button.tsx index 700b3e1..fc79749 100644 --- a/src/components/molecules/buttons/heading-button.tsx +++ b/src/components/molecules/buttons/heading-button.tsx @@ -1,10 +1,14 @@ import Heading, { type HeadingProps } from '@components/atoms/headings/heading'; import PlusMinus from '@components/atoms/icons/plus-minus'; -import { FC, SetStateAction } from 'react'; +import { SetStateAction, VFC } from 'react'; import { useIntl } from 'react-intl'; import styles from './heading-button.module.scss'; export type HeadingButtonProps = Pick & { + /** + * Set additional classnames to the button. + */ + className?: string; /** * Accordion state. */ @@ -24,7 +28,8 @@ export type HeadingButtonProps = Pick & { * * Render a button as accordion title to toggle body. */ -const HeadingButton: FC = ({ +const HeadingButton: VFC = ({ + className = '', expanded, level, setExpanded, @@ -47,18 +52,14 @@ const HeadingButton: FC = ({ return ( ); }; -- cgit v1.2.3