Replaced now-defunct CSF 1 & 2 types ComponentStory and ComponentMeta with StoryObj and Meta respectively
Updated all stories to the new single-const format
Created Story type and added it to all stories for increased type safety
Unique to this PR
PhoneNumberFormatField
Added showRequiredLabel: true to all components' error story, since it made semantic sense with the error story we were telling
All components except PhoneNumberFormatField
Because PhoneNumberFormatField does not have many props the other three do, it did not receive these stories
Added
Required story, same as PhoneNumberFormatField
Adornments
Tooltip Message / Icon
You might notice I didn't add a story for every single prop. My heuristic is if the property involves a React Node/Icon or is potentially confusing for a user to play with in the top sandbox, then I'll add a story and maybe a doc explanation if needed. If it's just a string someone can input, then I'll skip it. My goal is to balance completeness of stories with getting all stories updated reasonably quickly. I also hope this thinking can help future developers and future components.
What Was Changed
Common to all CSF3 updates
ComponentStory
andComponentMeta
withStoryObj
andMeta
respectivelyUnique to this PR
PhoneNumberFormatField
showRequiredLabel: true
to all components' error story, since it made semantic sense with the error story we were tellingPhoneNumberFormatField
PhoneNumberFormatField
does not have many props the other three do, it did not receive these storiesPhoneNumberFormatField
Screenshots
Updated
PhoneNumberFormatField
Required StoryNew
PercentFormatField
StoriesNew
PriceFormatField
StoriesNew
UnitNumberFormatField
Stories