mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-30 09:46:35 +00:00
wip: gateway
This commit is contained in:
27
cloud/web/src/ui/dialog.tsx
Normal file
27
cloud/web/src/ui/dialog.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Dialog as Kobalte } from "@kobalte/core/dialog"
|
||||
import { ComponentProps, ParentProps } from "solid-js"
|
||||
|
||||
export type Props = ParentProps<{
|
||||
size?: "sm" | "md"
|
||||
transition?: boolean
|
||||
}> &
|
||||
ComponentProps<typeof Kobalte>
|
||||
|
||||
export function Dialog(props: Props) {
|
||||
return (
|
||||
<Kobalte {...props}>
|
||||
<Kobalte.Portal>
|
||||
<Kobalte.Overlay data-component="dialog-overlay" />
|
||||
<div data-component="dialog-center">
|
||||
<Kobalte.Content
|
||||
data-transition={props.transition ? "" : undefined}
|
||||
data-size={props.size}
|
||||
data-slot="content"
|
||||
>
|
||||
{props.children}
|
||||
</Kobalte.Content>
|
||||
</div>
|
||||
</Kobalte.Portal>
|
||||
</Kobalte>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user