mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 12:55:06 +03:00
* init * add more examples * update modal * update modals * more modals updated * update modal * Update NewAccessTokenButton.tsx * Update NewAccessTokenButton.tsx * fix: issue with scale on dialog opening. chore: added bg-dialog color * fix modals * add deprecation notices * revert bg * revert * Update Modal.tsx * Update PITRSelection.tsx * update dialog docs * fix: issue with payment method modal * update terminal instructions * update padding defaults
44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import { Link2 } from 'lucide-react'
|
|
import { useState } from 'react'
|
|
import { Button, Modal } from 'ui'
|
|
|
|
export default function ModalVerticalLayout() {
|
|
const [visible, setVisible] = useState(false)
|
|
|
|
return (
|
|
<>
|
|
<Button type="default" onClick={() => setVisible(!visible)}>
|
|
Open Modal
|
|
</Button>
|
|
<Modal
|
|
visible={visible}
|
|
onCancel={() => setVisible(!visible)}
|
|
onConfirm={() => setVisible(!visible)}
|
|
title="This is the title of the modal"
|
|
description="And i am the description"
|
|
layout="vertical"
|
|
size="medium"
|
|
hideClose={false}
|
|
header={
|
|
<div className="flex items-center gap-2 text-foreground">
|
|
<div className="text-brand">
|
|
<Link2 />
|
|
</div>
|
|
<div className="flex items-baseline gap-2">
|
|
<h3>This is the title</h3>
|
|
<span className="text-xs text-foreground-muted">This is the title</span>
|
|
</div>
|
|
</div>
|
|
}
|
|
>
|
|
<Modal.Content>
|
|
<p>
|
|
Modal content is inserted here, if you need to insert anything into the Modal you can do
|
|
so via `children`.
|
|
</p>
|
|
</Modal.Content>
|
|
</Modal>
|
|
</>
|
|
)
|
|
}
|