carbon
carbon copied to clipboard
feat(slider): expose formatLabel to value tooltip
This PR exposes formatLabel to the tooltip for devs to use
- expose formatLabel to thumbWrapper for twoHandles as well as single handle.
- add examples on storybooks on how it could be used
Doesn't close a PR but gets us closer to the comment here: https://github.com/carbon-design-system/carbon/issues/7581#issuecomment-1113437295
Changelog
New
-
formatLabel
now also works with the Tooltips for the thumbs which gives you more options on how to customize how the value looks. - Two new storybooks added to describe the change
Changed
- Changed the definition of
formatLabel
to represent the above addition
Testing / Reviewing
- Ran unit test to make sure nothing is breaking
- You can test it by changing the storybooks:
Screenshots