Skip to content

Commit a8a0c69

Browse files
committed
feat(SelectDialog): add headerTextLevel prop
1 parent 5475d7e commit a8a0c69

File tree

1 file changed

+10
-1
lines changed
  • packages/main/src/components/SelectDialog

1 file changed

+10
-1
lines changed

packages/main/src/components/SelectDialog/index.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ export interface SelectDialogPropTypes
6666
* Specifies the `headerText` alignment.
6767
*/
6868
headerTextAlignCenter?: boolean;
69+
/**
70+
* Defines the aria-level of the `headerText`.
71+
* Available options are: `"H1"` to `"H6"`.
72+
* This property does not influence the style of the `headerText`.
73+
*
74+
* @default "H1"
75+
*/
76+
headerTextLevel?: TitleLevel | keyof typeof TitleLevel;
6977
/**
7078
* Overwrites the default text for the confirmation button.
7179
*/
@@ -150,6 +158,7 @@ const SelectDialog = forwardRef<DialogDomRef, SelectDialogPropTypes>((props, ref
150158
growing,
151159
headerText,
152160
headerTextAlignCenter,
161+
headerTextLevel = TitleLevel.H1,
153162
listProps = {},
154163
selectionMode = ListSelectionMode.Single,
155164
numberOfSelectedItems,
@@ -305,7 +314,7 @@ const SelectDialog = forwardRef<DialogDomRef, SelectDialogPropTypes>((props, ref
305314
)}
306315
<Title
307316
className={clsx(classNames.title, headerTextAlignCenter && classNames.titleCenterAlign)}
308-
level={TitleLevel.H1}
317+
level={headerTextLevel}
309318
>
310319
{headerText}
311320
</Title>

0 commit comments

Comments
 (0)