histoire
histoire copied to clipboard
get background color in stories
Clear and concise description of the problem
As a developer using Histoire I wish dynamicly change my text color depending on background color so that get background color in stories is helpful.I intend to submit a PR for this issue.
Suggested solution
maybe we can use project/inject,or some hooks in story component to get the background color,or provide a contrast color variable in global css
Alternative
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.
Providing a contrast color (through a CSS variable) alongside a background color for each background preset seems good!