Skip to content

The open source coding agent.

TypeScript

chore: cleanup

Adamdca2540ca786
diff --git a/packages/app/src/pages/layout.tsx b/packages/app/src/pages/layout.tsx
index bf44efa1c13..3b8c76e0412 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 5c7cdc233bf..177dc0a7974 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 40a6ac83d6b..797fbcbfc4c 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"