Listbox: Support for reset action
We need a way to add a reset button to listboxes' headers.
The reset button should...
- ...have a customizable label to reflect the context the listbox is being used in.
- ...only show up if the listbox has a header. Showing the reset button in an empty header is not allowed.
- ...be hidden if no item is selected in the listbox.
Implementation plan
-
Expose an resetButtonLabel
prop. -
If the prop is omitted, the button never shows up. -
On click, the cleared
event is emitted. -
Left-align the header to match the designs in https://www.figma.com/file/qEddyqCrI7kPSBjGmwkZzQ/branch/5YYrJSrszk6dw9619HHPt9/%F0%9F%93%99-Component-library?node-id=425%3A14.
Edited by Paul Gascou-Vaillancourt