diff --git a/cmdk/src/index.tsx b/cmdk/src/index.tsx index 3131c7b..f9c7a54 100644 --- a/cmdk/src/index.tsx +++ b/cmdk/src/index.tsx @@ -61,6 +61,8 @@ type GroupProps = Children & Omit & { /** Optional heading to render for this group. */ heading?: React.ReactNode + /** Provide a className to the Heading content. */ + headingClassName?: string /** If no heading is provided, you must provide a value that is unique for this group. */ value?: string /** Whether this group is forcibly rendered regardless of filtering. */ @@ -727,7 +729,7 @@ const Item = React.forwardRef((props, forwardedRef) = * Grouped items are always shown together. */ const Group = React.forwardRef((props, forwardedRef) => { - const { heading, children, forceMount, ...etc } = props + const { heading, headingClassName, children, forceMount, ...etc } = props const id = useId() const ref = React.useRef(null) const headingRef = React.useRef(null) @@ -754,7 +756,7 @@ const Group = React.forwardRef((props, forwardedRef) hidden={render ? undefined : true} > {heading && ( -
+
{heading}
)}