Skip to content

Commit 3366ae3

Browse files
Michael Jordandannify
andauthored
fix(#2632): Dialog Heading should use H2 rather than H3 (#2633)
* fix(#2632): Dialog Heading should use H2 rather than H3 Add a level prop to specify the Heading level for Dialog heading slot. * fix(#2633): remove public API for dialog heading level Not sure how much use a public API would get. * fix(#2633): remove redundant Heading level declaration Co-authored-by: Danni <[email protected]>
1 parent c838181 commit 3366ae3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@react-spectrum/dialog/src/Dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function Dialog(props: SpectrumDialogProps, ref: DOMRef) {
6363
let slots = useMemo(() => ({
6464
hero: {UNSAFE_className: styles['spectrum-Dialog-hero']},
6565
header: {UNSAFE_className: styles['spectrum-Dialog-header']},
66-
heading: {UNSAFE_className: classNames(styles, 'spectrum-Dialog-heading', {'spectrum-Dialog-heading--noHeader': !hasHeader}), ...titleProps},
66+
heading: {UNSAFE_className: classNames(styles, 'spectrum-Dialog-heading', {'spectrum-Dialog-heading--noHeader': !hasHeader}), level: 2, ...titleProps},
6767
typeIcon: {UNSAFE_className: styles['spectrum-Dialog-typeIcon']},
6868
divider: {UNSAFE_className: styles['spectrum-Dialog-divider'], size: 'M'},
6969
content: {UNSAFE_className: styles['spectrum-Dialog-content']},

0 commit comments

Comments
 (0)