feat(styles): error page templates - #8405
Conversation
🦋 Changeset detectedLatest commit: e498f7f The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
alionazherdetska
left a comment
There was a problem hiding this comment.
Error pages look cool!
|
@rouvenpost can you please do the design review😊 |
|
alionazherdetska
left a comment
There was a problem hiding this comment.
Approving with a small suggestion: the 8 error codes are typed out by hand in four places now - the ErrorType union, contentByType's keys, and argTypes.type.options/labels. ts checks contentByType against ErrorType, but options and labels are just plain strings with nothing linking them back, so nothing stops them drifting apart. like if 502 gets added to contentByType later but someone forgets options, storybook just quietly won't offer it as a choice, no error or anything. or the other way round, adding it to options but not contentByType would throw at render time since contentByType['502'] is undefined
could just derive options from contentByType's keys instead, options: Object.keys(contentByType), so it always matches whatever's actually there and nothing needs sycing by hand.



📄 Description
Please include a summary of the changes made in this PR.
🚀 Demo
If applicable, please add a screenshot or video to illustrate the changes.
🔮 Design review
🧪 Visual regression tests
📝 Checklist