File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,16 +2,16 @@ import React from "react"
22import Heading , { HeadingProps } from "./Heading"
33import "./HeadingGroup.scss"
44
5- export interface HeadingGroupProps extends Pick < HeadingProps , "size" > {
6- /** A string or element to display in an `h2` tag (overridable via `headingPriority `) */
5+ export interface HeadingGroupProps {
6+ /** A string or element to display in an `h2` tag (overridable via `headingProps.priority `) */
77 heading : React . ReactNode
88 /** A string or element to display in a `p` tag */
99 subheading : React . ReactNode
1010 /**
1111 * The heading level (1 through 6)
1212 * @default 2
1313 */
14- headingPriority ?: 1 | 2 | 3 | 4 | 5 | 6
14+ headingProps ?: HeadingProps
1515 /** Element ID */
1616 id ?: string
1717 /** Additional class name for the whole group */
@@ -24,7 +24,7 @@ const HeadingGroup = (props: HeadingGroupProps) => {
2424
2525 return (
2626 < hgroup id = { props . id } className = { classNames . join ( " " ) } role = "group" >
27- < Heading priority = { props . headingPriority ?? 2 } size = { props . size || "3xl" } >
27+ < Heading priority = { 2 } size = { "3xl" } { ... props . headingProps } >
2828 { props . heading }
2929 </ Heading >
3030 < p > { props . subheading } </ p >
You can’t perform that action at this time.
0 commit comments