diff --git a/cmdk/src/index.tsx b/cmdk/src/index.tsx index 3131c7b..4ad84b1 100644 --- a/cmdk/src/index.tsx +++ b/cmdk/src/index.tsx @@ -33,6 +33,8 @@ type DialogProps = RadixDialog.DialogProps & contentClassName?: string /** Provide a custom element the Dialog should portal into. */ container?: HTMLElement + /** Provide a hidden description text to the Dialog content */ + description?: string } type ListProps = Children & DivProps & { @@ -880,12 +882,14 @@ const List = React.forwardRef((props, forwardedRef) = * Renders the command menu in a Radix Dialog. */ const Dialog = React.forwardRef((props, forwardedRef) => { - const { open, onOpenChange, overlayClassName, contentClassName, container, ...etc } = props + const { open, onOpenChange, overlayClassName, contentClassName, container, title, description, ...etc } = props return ( + {title && } + {description && }