From ab467d9cd06c354734d429fabd714810d1a4f70c Mon Sep 17 00:00:00 2001 From: Daniel Fahl Date: Thu, 5 Dec 2024 06:42:11 +0100 Subject: [PATCH 1/2] feat(FwbDropdown): Add color prop to dropdown to adjust default trigger button style --- docs/components/dropdown.md | 61 ++++-- .../examples/FwbDropdownExampleColors.vue | 179 ++++++++++++++++++ src/components/FwbDropdown/FwbDropdown.vue | 54 ++++-- 3 files changed, 262 insertions(+), 32 deletions(-) create mode 100644 docs/components/dropdown/examples/FwbDropdownExampleColors.vue diff --git a/docs/components/dropdown.md b/docs/components/dropdown.md index b6ccdeb7..9ef76dbd 100644 --- a/docs/components/dropdown.md +++ b/docs/components/dropdown.md @@ -1,8 +1,8 @@ # Vue Dropdown - Flowbite @@ -199,6 +199,45 @@ import { FwbDropdown, FwbListGroup, FwbListGroupItem } from 'flowbite-vue' ``` +## Dropdown - Button colors + +```vue + + + +``` + + ## Dropdown - trigger @@ -261,13 +300,13 @@ 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` | +| Name | Values | Default | +|-------------|---------------------|------------| +| placement | `DropdownPlacement` | `'bottom'` | +| text | `string` | `''` | +| transition | `string` | `''` | +| closeInside | `boolean` | `false` | +| alignToEnd | `boolean` | `false` | ### Events | Name | Description | diff --git a/docs/components/dropdown/examples/FwbDropdownExampleColors.vue b/docs/components/dropdown/examples/FwbDropdownExampleColors.vue new file mode 100644 index 00000000..e21f29ab --- /dev/null +++ b/docs/components/dropdown/examples/FwbDropdownExampleColors.vue @@ -0,0 +1,179 @@ + + + diff --git a/src/components/FwbDropdown/FwbDropdown.vue b/src/components/FwbDropdown/FwbDropdown.vue index 8e3a2e49..084a2424 100644 --- a/src/components/FwbDropdown/FwbDropdown.vue +++ b/src/components/FwbDropdown/FwbDropdown.vue @@ -6,7 +6,7 @@
- + {{ text }}