From 9ec5da7ede5bb22a0460abc9b6bab4dc8139ddd1 Mon Sep 17 00:00:00 2001 From: Vincent Smedinga Date: Fri, 7 Jun 2024 11:38:53 +0200 Subject: [PATCH] Clarify that heading level has no visual effect --- packages/react/src/Alert/Alert.tsx | 5 ++++- packages/react/src/FormErrorList/FormErrorList.tsx | 5 ++++- packages/react/src/TableOfContents/TableOfContents.tsx | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/react/src/Alert/Alert.tsx b/packages/react/src/Alert/Alert.tsx index e602a6e4e3..7c476fe39d 100644 --- a/packages/react/src/Alert/Alert.tsx +++ b/packages/react/src/Alert/Alert.tsx @@ -19,7 +19,10 @@ export type AlertProps = { closeButtonLabel?: string /** The text for the Heading. */ heading?: string - /** The hierarchical level of the Heading within the document. */ + /** + * The hierarchical level of the Heading within the document. + * Note: this intentionally does not change the font size. + */ headingLevel?: HeadingLevel /** A function to run when dismissing. */ onClose?: () => void diff --git a/packages/react/src/FormErrorList/FormErrorList.tsx b/packages/react/src/FormErrorList/FormErrorList.tsx index edbf3a1021..ce29f292e4 100644 --- a/packages/react/src/FormErrorList/FormErrorList.tsx +++ b/packages/react/src/FormErrorList/FormErrorList.tsx @@ -20,7 +20,10 @@ export type FormErrorListProps = { errors: FormError[] /** The text for the Heading. */ heading?: string - /** The hierarchical level of the Heading within the document. */ + /** + * The hierarchical level of the Heading within the document. + * Note: this intentionally does not change the font size. + */ headingLevel?: HeadingLevel } & HTMLAttributes diff --git a/packages/react/src/TableOfContents/TableOfContents.tsx b/packages/react/src/TableOfContents/TableOfContents.tsx index 4f399567ff..db7c78c303 100644 --- a/packages/react/src/TableOfContents/TableOfContents.tsx +++ b/packages/react/src/TableOfContents/TableOfContents.tsx @@ -14,7 +14,10 @@ import type { HeadingLevel } from '../Heading' export type TableOfContentsProps = { /** The text for the Heading. */ heading?: string - /** The hierarchical level of the Heading within the document. */ + /** + * The hierarchical level of the Heading within the document. + * Note: this intentionally does not change the font size. + */ headingLevel?: HeadingLevel } & PropsWithChildren>