EQWorks / lumen-labs

React library of basic components based on Tailwind CSS
https://eqworks.github.io/lumen-labs
5 stars 2 forks source link

[G2M] dropdown - add allowClear prop #71

Closed vxsl closed 2 years ago

vxsl commented 2 years ago

this prop allows us to control whether the "x" clear button appears when an option is selected in the dropdown.

One example for a request for this feature is here

vxsl commented 2 years ago

We should add the prop to the list shown in the storybook.

@geoerika the way this story is set up, the DropdownBase is the base component for the story, so to have this prop show up in the controls, it would have to be added to the DropdownBase PropTypes which wouldn't make sense in the current implementation. This is the case for other props missing here as well.

perhaps going forward we can revise the storybook to somehow account for this, and display controls for all defined props of the component that is actually being rendered (i.e. DropdownSelect vs DropdownBase, etc.).