Skip to content

Commit

Permalink
Update slot-content.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanreyes committed Jan 31, 2023
1 parent 363bed4 commit 0359fda
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions docs/docs/datepicker/slot-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ When a default slot is used with `VDatePicker`, that content will display instea
</Example>

```vue
<VDatePicker v-model="date">
<template #default="{ togglePopover }">
<button
class="px-3 py-2 bg-blue-500 text-sm text-white font-semibold rounded-md"
@click="togglePopover"
>
Select date
</button>
</template>
</VDatePicker>
<template>
<VDatePicker v-model="date">
<template #default="{ togglePopover }">
<button
class="px-3 py-2 bg-blue-500 text-sm text-white font-semibold rounded-md"
@click="togglePopover"
>
Select date
</button>
</template>
</VDatePicker>
</template>
```

In this simple example, we display a `<button />` as the default slot, and use one of the slot props provided to toggle the calendar popover.
Expand Down

0 comments on commit 0359fda

Please sign in to comment.