histoire icon indicating copy to clipboard operation
histoire copied to clipboard

get background color in stories

Open faga295 opened this issue 3 years ago • 1 comments

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

faga295 avatar Oct 15 '22 17:10 faga295

Providing a contrast color (through a CSS variable) alongside a background color for each background preset seems good!

Akryum avatar Oct 17 '22 17:10 Akryum