From 18537ba74df7d1fd8484a1e872528c3741ba02f1 Mon Sep 17 00:00:00 2001 From: Huw Wilkins Date: Mon, 20 May 2024 13:49:14 +1000 Subject: [PATCH] feat: add ID to title element --- src/components/Panel/Panel.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/Panel/Panel.tsx b/src/components/Panel/Panel.tsx index e227f9b0f..50a83b65c 100644 --- a/src/components/Panel/Panel.tsx +++ b/src/components/Panel/Panel.tsx @@ -75,6 +75,10 @@ type TitleProps = { * @default h4 */ titleComponent?: ElementType; + /** + * An ID for the title element. + */ + titleId?: string; }; type HeaderProps = ExclusiveProps< @@ -185,6 +189,7 @@ const Panel = ({ title, titleClassName, titleComponent: TitleComponent = "h4", + titleId, toggle, wrapContent = true, ...props @@ -208,6 +213,7 @@ const Panel = ({ ) : ( {title}