aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx')
-rw-r--r--src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx b/src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx
index 6a19d92..1040e7e 100644
--- a/src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx
+++ b/src/components/WidgetParts/ExpandableWidget/ExpandableWidget.tsx
@@ -9,12 +9,14 @@ const ExpandableWidget = ({
titleLevel = 2,
expand = false,
withBorders = false,
+ kind = 'regular',
}: {
children: ReactNode;
title: string;
titleLevel?: TitleLevel;
expand?: boolean;
withBorders?: boolean;
+ kind?: 'regular' | 'toc';
}) => {
const intl = useIntl();
const [isExpanded, setIsExpanded] = useState<boolean>(expand);
@@ -23,9 +25,10 @@ const ExpandableWidget = ({
const TitleTag = `h${titleLevel}` as keyof JSX.IntrinsicElements;
+ const wrapperKindClass = styles[`wrapper--${kind}`];
const wrapperClasses = `${styles.wrapper} ${
isExpanded ? styles['wrapper--expanded'] : ''
- }`;
+ } ${wrapperKindClass}`;
const bodyClasses = `${styles.body} ${
withBorders ? styles['body--borders'] : ''