mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +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
26 lines
635 B
Svelte
26 lines
635 B
Svelte
<script lang="ts">
|
|
import {
|
|
ComposedModal,
|
|
ModalHeader,
|
|
ModalBody,
|
|
ModalFooter,
|
|
Checkbox,
|
|
} from "../types";
|
|
|
|
let checked = false;
|
|
</script>
|
|
|
|
<ComposedModal open on:close on:click:button--primary>
|
|
<ModalHeader title="Confirm changes" />
|
|
<ModalBody hasForm>
|
|
<Checkbox labelText="I have reviewed the changes" bind:checked />
|
|
</ModalBody>
|
|
<ModalFooter
|
|
primaryButtonText="Proceed"
|
|
primaryButtonDisabled="{!checked}"
|
|
secondaryButtons="{[{ text: 'Cancel' }, { text: 'Duplicate' }]}"
|
|
on:click:button--secondary="{({ detail }) => {
|
|
console.log(detail);
|
|
}}"
|
|
/>
|
|
</ComposedModal>
|