From 34922707fc0d5a0cabd60c32f7202de7263f684d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Magalh=C3=A3es?= Date: Tue, 11 Apr 2023 12:52:26 -0300 Subject: [PATCH] feat: add overlay and content className to dialog part (#114) --- cmdk/src/index.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmdk/src/index.tsx b/cmdk/src/index.tsx index 90b78b6..c670453 100644 --- a/cmdk/src/index.tsx +++ b/cmdk/src/index.tsx @@ -16,6 +16,10 @@ type SeparatorProps = DivProps & { } type DialogProps = RadixDialog.DialogProps & CommandProps & { + /** Provide a className to the Dialog overlay. */ + overlayClassName?: string + /** Provide a className to the Dialog content. */ + contentClassName?: string /** Provide a custom element the Dialog should portal into. */ container?: HTMLElement } @@ -792,12 +796,12 @@ const List = React.forwardRef((props, forwardedRef) = * Renders the command menu in a Radix Dialog. */ const Dialog = React.forwardRef((props, forwardedRef) => { - const { open, onOpenChange, container, ...etc } = props + const { open, onOpenChange, overlayClassName, contentClassName, container, ...etc } = props return ( - - + +