-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add disabled state to dropdown trigger button (#338)
* feat(dropdown): Add disabled state to be passed through to trigger button * chore: add prop, block toggling when disabled, ensure readability, fix linting errors * chore: make example component consistent with docs code block * chore: elaborate on disabled state in conjunction with custom triggers
- Loading branch information
Showing
3 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
docs/components/dropdown/examples/FwbDropdownExampleDisabled.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template> | ||
<div class="vp-raw flex gap-2 flex-wrap"> | ||
<fwb-dropdown | ||
text="Normal State" | ||
> | ||
<div class="w-52"> | ||
<p class="p-4"> | ||
Dropdown content | ||
</p> | ||
</div> | ||
</fwb-dropdown> | ||
<fwb-dropdown | ||
text="Disabled State" | ||
disabled | ||
> | ||
<div class="w-52"> | ||
<p class="p-4"> | ||
Disabled dropdown content | ||
</p> | ||
</div> | ||
</fwb-dropdown> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { FwbDropdown } from '../../../../src/index' | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters