From 5c990dadc58fe117e3a12c6eda88ebaa8a448bdb Mon Sep 17 00:00:00 2001 From: Steve Axtmann Date: Thu, 11 Jul 2024 08:57:04 +0000 Subject: [PATCH 1/2] feat(dropdown): add show/hide events --- docs/components/dropdown.md | 23 ++++++++++++++++++++++ src/components/FwbDropdown/FwbDropdown.vue | 18 ++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/docs/components/dropdown.md b/docs/components/dropdown.md index 844a5c23..4c354866 100644 --- a/docs/components/dropdown.md +++ b/docs/components/dropdown.md @@ -257,3 +257,26 @@ import { FwbDropdown, FwbListGroup, FwbListGroupItem } from 'flowbite-vue' import { FwbDropdown, ListGroup, ListGroupItem } from 'flowbite-vue' ``` + +## API + +### Props +| Name | Values | Default | +|----------|--------|---------| +| placement | `DropdownPlacement` | `'bottom'` | +| text | `string` | `''` | +| transition | `string` | `''` | +| closeInside | `boolean` | `false` | +| alignToEnd | `boolean` | `false` | + +### Events +| Name | Description | +|------|------------------------| +| show | the dropdown is opened | +| hide | the dropdown is closed | + +### Slots +| Name | Description | +|------------|-------------------| +| default | dropdown content | +| suffix | button suffix | diff --git a/src/components/FwbDropdown/FwbDropdown.vue b/src/components/FwbDropdown/FwbDropdown.vue index 93b73d67..5aff06b6 100644 --- a/src/components/FwbDropdown/FwbDropdown.vue +++ b/src/components/FwbDropdown/FwbDropdown.vue @@ -44,7 +44,7 @@