mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
move to frame
This commit is contained in:
parent
49884b6421
commit
db520b99dc
2 changed files with 14 additions and 10 deletions
|
@ -3,19 +3,10 @@ components: ["DatePicker", "DatePickerInput", "DatePickerSkeleton"]
|
|||
---
|
||||
|
||||
<script>
|
||||
import { DatePicker, DatePickerSkeleton, DatePickerInput, InlineNotification, CodeSnippet } from "carbon-components-svelte";
|
||||
import { DatePicker, DatePickerSkeleton, DatePickerInput } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
|
||||
const modalCodeSnippet = `<DatePicker datePickerType="single" flatpickrProps="{{ static: true }}">
|
||||
<DatePickerInput />
|
||||
</DatePicker>"/>`
|
||||
</script>
|
||||
|
||||
<InlineNotification svx-ignore title="Note:" kind="info" hideCloseButton>
|
||||
<span class="body-short-01">If you are using the DatePicker inside of a Modal you might need to add <code>static</code> to the <code>flatpickrProps</code> as shown below to correct the positioning.</span>
|
||||
</InlineNotification>
|
||||
<CodeSnippet type="multi" code={modalCodeSnippet}/>
|
||||
|
||||
### Default (simple)
|
||||
|
||||
<DatePicker>
|
||||
|
@ -78,6 +69,10 @@ components: ["DatePicker", "DatePickerInput", "DatePickerSkeleton"]
|
|||
|
||||
<FileSource src="/framed/DatePicker/DatePickerRange" />
|
||||
|
||||
### DatePicker in a modal
|
||||
|
||||
<FileSource src="/framed/DatePicker/DatePickerModal" />
|
||||
|
||||
### Skeleton
|
||||
|
||||
<DatePickerSkeleton />
|
||||
|
|
9
docs/src/pages/framed/DatePicker/DatePickerModal.svelte
Normal file
9
docs/src/pages/framed/DatePicker/DatePickerModal.svelte
Normal file
|
@ -0,0 +1,9 @@
|
|||
<script>
|
||||
import { Modal, DatePicker, DatePickerInput } from "carbon-components-svelte";
|
||||
</script>
|
||||
|
||||
<Modal>
|
||||
<DatePicker flatpickrProps="{{ static: true }}">
|
||||
<DatePickerInput />
|
||||
</DatePicker>"/>
|
||||
</Modal>
|
Loading…
Add table
Add a link
Reference in a new issue