diff --git a/docs/components/dropdown.md b/docs/components/dropdown.md index b10d3eb5..98fdc3cc 100644 --- a/docs/components/dropdown.md +++ b/docs/components/dropdown.md @@ -3,6 +3,7 @@ import FwbDropdownExamplePlacement from './dropdown/examples/FwbDropdownExampleP import FwbDropdownExampleAlignment from './dropdown/examples/FwbDropdownExampleAlignment.vue' import FwbDropdownExampleListGroup from './dropdown/examples/FwbDropdownExampleListGroup.vue' import FwbDropdownExampleColors from './dropdown/examples/FwbDropdownExampleColors.vue' +import FwbDropdownExampleDisabled from './dropdown/examples/FwbDropdownExampleDisabled.vue' import FwbDropdownExampleTrigger from './dropdown/examples/FwbDropdownExampleTrigger.vue' import FwbDropdownExampleCloseInside from './dropdown/examples/FwbDropdownExampleCloseInside.vue' @@ -239,6 +240,25 @@ import { FwbDropdown } from 'flowbite-vue' ``` +## Dropdown - Disabled +Please note that when using a custom trigger (via the trigger slot), you'll need to also implement the disabled state manually by passing the disabled prop to your trigger element. You should still use the disabled prop here to ensure correct handling of the disabled state in the dropdown click handler. + + +```vue + + + +``` + ## Dropdown - trigger @@ -307,6 +327,7 @@ import { FwbDropdown, ListGroup, ListGroupItem } from 'flowbite-vue' | placement | `DropdownPlacement` | `'bottom'` | | text | `string` | `''` | | color | `ButtonVariant` | `'default'` | +| disabled | `boolean` | `false` | | transition | `string` | `''` | | closeInside | `boolean` | `false` | | alignToEnd | `boolean` | `false` | diff --git a/docs/components/dropdown/examples/FwbDropdownExampleDisabled.vue b/docs/components/dropdown/examples/FwbDropdownExampleDisabled.vue new file mode 100644 index 00000000..e0a70912 --- /dev/null +++ b/docs/components/dropdown/examples/FwbDropdownExampleDisabled.vue @@ -0,0 +1,27 @@ + + + diff --git a/src/components/FwbDropdown/FwbDropdown.vue b/src/components/FwbDropdown/FwbDropdown.vue index 04b16e8c..b8af8fcd 100644 --- a/src/components/FwbDropdown/FwbDropdown.vue +++ b/src/components/FwbDropdown/FwbDropdown.vue @@ -6,7 +6,10 @@
- + {{ text }}