Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

♻️(frontend) make Dialog's title optional

lebaudantoinece3a6dab1247
diff --git a/src/frontend/src/primitives/Dialog.tsx b/src/frontend/src/primitives/Dialog.tsx
index 0c5c044f..02e2bf47 100644
--- a/src/frontend/src/primitives/Dialog.tsx
+++ b/src/frontend/src/primitives/Dialog.tsx
@@ -48,7 +48,7 @@ const StyledRACDialog = styled(RACDialog, {
})
export type DialogProps = RACDialogProps & {
- title: string
+ title?: string
onClose?: () => void
/**
* use the Dialog as a controlled component
@@ -96,13 +96,15 @@ export const Dialog = ({
pointerEvents="auto"
>
<Box size="sm" type="dialog">
- <Heading
- slot="title"
- level={1}
- className={text({ variant: 'h1' })}
- >
- {title}
- </Heading>
+ {!!title && (
+ <Heading
+ slot="title"
+ level={1}
+ className={text({ variant: 'h1' })}
+ >
+ {title}
+ </Heading>
+ )}
{typeof children === 'function'
? children({ close })
: children}