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 the media queries utils so it gets the values from the current theme #420

Merged
merged 1 commit into from
Feb 25, 2018
Merged

fix the media queries utils so it gets the values from the current theme #420

merged 1 commit into from
Feb 25, 2018

Conversation

CesarLanderos
Copy link
Contributor

@CesarLanderos CesarLanderos commented Feb 22, 2018

Description

the media queries helpers use the base theme breakpoints instead of the current theme ones set on the standalone component props, this PR fixes that.

@CesarLanderos
Copy link
Contributor Author

CesarLanderos commented Feb 22, 2018

seems like i need to fix the tests so the theme gets injected into the context 😞

@RomanHotsiy
Copy link
Member

RomanHotsiy commented Feb 23, 2018

@CesarLanderos to fix this change args[0] to props => props., e.g.:

@media (max-width: ${args[0].theme.breakpoints[breakpoint]}) {

should become

@media (max-width: ${props => props.theme.breakpoints[breakpoint]}) {

@CesarLanderos
Copy link
Contributor Author

\o/

done 😃

@RomanHotsiy RomanHotsiy merged commit 3924d3c into Redocly:react-rewrite Feb 25, 2018
@RomanHotsiy
Copy link
Member

@CesarLanderos thanks! 👍

@CesarLanderos CesarLanderos deleted the fix/theme-breakpoints branch February 27, 2018 03:01
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.

2 participants