Skip to content

Commit

Permalink
Make descriptions and imports consistent for heading and heading level
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentSmedinga committed Jun 7, 2024
1 parent de0d978 commit 9b5038a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/react/src/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import clsx from 'clsx'
import { forwardRef } from 'react'
import type { ForwardedRef, HTMLAttributes, PropsWithChildren } from 'react'
import { Heading } from '../Heading'
import type { HeadingProps } from '../Heading'
import type { HeadingLevel } from '../Heading'
import { Icon } from '../Icon'
import { IconButton } from '../IconButton'

Expand All @@ -19,8 +19,8 @@ export type AlertProps = {
closeButtonLabel?: string
/** The text for the Heading. */
heading?: string
/** The hierarchical level of the Alert’s heading within the document. */
headingLevel?: HeadingProps['level']
/** The hierarchical level of the Heading within the document. */
headingLevel?: HeadingLevel
/** A function to run when dismissing. */
onClose?: () => void
/** The significance of the message conveyed. */
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/FormErrorList/FormErrorList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import clsx from 'clsx'
import { forwardRef } from 'react'
import type { ForwardedRef, HTMLAttributes } from 'react'
import { Alert } from '../Alert'
import { HeadingLevel } from '../Heading/Heading'
import type { HeadingLevel } from '../Heading'
import { LinkList } from '../LinkList'

export type FormError = {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Heading/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export type { HeadingProps } from './Heading'
export { Heading } from './Heading'
export type { HeadingLevel, HeadingProps } from './Heading'
7 changes: 4 additions & 3 deletions packages/react/src/TableOfContents/TableOfContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import { forwardRef } from 'react'
import type { ForwardedRef, HTMLAttributes, PropsWithChildren } from 'react'
import { TableOfContentsLink } from './TableOfContentsLink'
import { TableOfContentsList } from './TableOfContentsList'
import { Heading, type HeadingProps } from '../Heading'
import { Heading } from '../Heading'
import type { HeadingLevel } from '../Heading'

export type TableOfContentsProps = {
/** The text for the Heading. */
heading?: string
/** The hierarchical level of the Alert’s heading within the document. */
headingLevel?: HeadingProps['level']
/** The hierarchical level of the Heading within the document. */
headingLevel?: HeadingLevel
} & PropsWithChildren<HTMLAttributes<HTMLElement>>

const TableOfContentsRoot = forwardRef(
Expand Down

0 comments on commit 9b5038a

Please sign in to comment.