mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
* fix(data-table): export useStaticWidth prop * docs(data-table): add static width example * fix(data-table): do not render table header if title/description not provided * feat(modal): dispatch "click:button--primary" as an alias to "submit" * test: update DataTable types test * test(modal): update modal type tests * docs(data-table): add clear reminder to key headers/rows
22 lines
541 B
Svelte
22 lines
541 B
Svelte
<script lang="ts">
|
|
import { Button, Modal } from "../types";
|
|
|
|
let open = false;
|
|
</script>
|
|
|
|
<Button on:click="{() => (open = true)}">Create database</Button>
|
|
|
|
<Modal
|
|
bind:open
|
|
modalHeading="Create database"
|
|
primaryButtonText="Confirm"
|
|
secondaryButtons="{[{ text: 'Cancel' }, { text: 'Duplicate' }]}"
|
|
secondaryButtonText="Cancel"
|
|
on:click:button--secondary="{({ detail }) => (open = false)}"
|
|
on:open
|
|
on:close
|
|
on:submit
|
|
on:click:button--primary
|
|
>
|
|
<p>Create a new Cloudant database in the US South region.</p>
|
|
</Modal>
|