Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(legends): Respect theme fill color #941

Merged
merged 1 commit into from
Jun 24, 2020
Merged

fix(legends): Respect theme fill color #941

merged 1 commit into from
Jun 24, 2020

Conversation

joostdecock
Copy link
Contributor

This fixes #814 - or so I hope

The fill color of the legend text is currently not themeable
because the fill from the theme is always overwritten by either
the style from the local component state (my understanding is
that this style is from mouse hover effects) or the value of
the textColor prop which defaults to black.

This line would still allow the local state to take precendence,
but would then pick the theme's legend text fill color as a backup
and only then resort to the textColor props.

Disclaimer: This is the first time ever I look at the Nivo code
so there might be more subtle things that I'm overlooking.

This fixes #814 - or so I hope

The fill color of the legend text is currently not themeable
because the fill from the theme is always overwritten by either
the style from the local component state (my understanding is
that this style is from mouse hover effects) or the value of
the `textColor` prop which defaults to `black`.

This line would still allow the local state to take precendence,
but would then pick the theme's legend text fill color as a backup
and only then resort to the `textColor` props.

Disclaimer: This is the first time ever I look at the Nivo code
so there might be more subtle things that I'm overlooking.
@wyze wyze self-assigned this Jun 24, 2020
@wyze wyze changed the title fix(legends): Make text fill in BoxLegendSvg themeable fix(legends): Respect theme fill color Jun 24, 2020
@wyze wyze merged commit fa847f6 into plouc:master Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BoxLegendSvg does not respect theme.legend.text.fill
2 participants