docs: rename ComboBox example, do not open modal in DatePicker by default (#1374)

* docs(combo-box): "Selected id" -> " Initial selected id"

* docs(date-picker): do not open modal by default to prevent stealing focusing
This commit is contained in:
metonym 2022-06-26 16:43:34 -07:00 committed by GitHub
commit 45627aad1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View file

@ -1,12 +1,22 @@
<script>
import { Modal, DatePicker, DatePickerInput } from "carbon-components-svelte";
import {
Button,
Modal,
DatePicker,
DatePickerInput,
} from "carbon-components-svelte";
let open = false;
</script>
<Button on:click="{() => (open = true)}">Select date</Button>
<Modal
open
bind:open
modalHeading="Meeting date"
primaryButtonText="Confirm"
secondaryButtonText="Cancel"
on:click:button--secondary="{() => (open = false)}"
>
<DatePicker datePickerType="single" style="min-height: 420px">
<DatePickerInput labelText="Meeting date" placeholder="mm/dd/yyyy" />