mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
27 lines
630 B
Svelte
27 lines
630 B
Svelte
<script lang="ts">
|
|
import {
|
|
FluidForm,
|
|
FormGroup,
|
|
Checkbox,
|
|
Button,
|
|
} from "carbon-components-svelte";
|
|
|
|
export let preventDefault = false;
|
|
</script>
|
|
|
|
<FluidForm
|
|
data-testid="fluid-form"
|
|
on:submit={(e) => {
|
|
if (preventDefault) {
|
|
e.preventDefault();
|
|
}
|
|
console.log("submit", e);
|
|
}}
|
|
>
|
|
<FormGroup legendText="Checkboxes">
|
|
<Checkbox id="checkbox-0" labelText="Checkbox Label" checked />
|
|
<Checkbox id="checkbox-1" labelText="Checkbox Label" />
|
|
<Checkbox id="checkbox-2" labelText="Checkbox Label" disabled />
|
|
</FormGroup>
|
|
<Button type="submit">Submit</Button>
|
|
</FluidForm>
|