diff options
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/app/src/pages/layout.tsx | 4 | ||||
| -rw-r--r-- | packages/ui/src/components/dialog.css | 10 | ||||
| -rw-r--r-- | packages/ui/src/components/dialog.tsx | 3 |
3 files changed, 12 insertions, 5 deletions
diff --git a/packages/app/src/pages/layout.tsx b/packages/app/src/pages/layout.tsx index bf44efa1c..3b8c76e04 100644 --- a/packages/app/src/pages/layout.tsx +++ b/packages/app/src/pages/layout.tsx @@ -1020,7 +1020,7 @@ export default function Layout(props: ParentProps) { } return ( - <Dialog title="Delete workspace"> + <Dialog title="Delete workspace" fit> <div class="flex flex-col gap-4 px-2.5 pb-3"> <div class="flex flex-col gap-1"> <span class="text-14-regular text-text-strong">Delete workspace "{name()}"?</span> @@ -1097,7 +1097,7 @@ export default function Layout(props: ParentProps) { } return ( - <Dialog title="Reset workspace"> + <Dialog title="Reset workspace" fit> <div class="flex flex-col gap-4 px-2.5 pb-3"> <div class="flex flex-col gap-1"> <span class="text-14-regular text-text-strong">Reset workspace "{name()}"?</span> diff --git a/packages/ui/src/components/dialog.css b/packages/ui/src/components/dialog.css index 5c7cdc233..177dc0a79 100644 --- a/packages/ui/src/components/dialog.css +++ b/packages/ui/src/components/dialog.css @@ -118,9 +118,15 @@ outline: none; } } + } + + &[data-fit] { + [data-slot="dialog-container"] { + height: auto; - &:focus-visible { - outline: none; + [data-slot="dialog-content"] { + min-height: 0; + } } } } diff --git a/packages/ui/src/components/dialog.tsx b/packages/ui/src/components/dialog.tsx index 40a6ac83d..797fbcbfc 100644 --- a/packages/ui/src/components/dialog.tsx +++ b/packages/ui/src/components/dialog.tsx @@ -8,11 +8,12 @@ export interface DialogProps extends ParentProps { action?: JSXElement class?: ComponentProps<"div">["class"] classList?: ComponentProps<"div">["classList"] + fit?: boolean } export function Dialog(props: DialogProps) { return ( - <div data-component="dialog"> + <div data-component="dialog" data-fit={props.fit ? true : undefined}> <div data-slot="dialog-container"> <Kobalte.Content data-slot="dialog-content" |
