-
Notifications
You must be signed in to change notification settings - Fork 5
[#135] Stop using parametric PropModifiers for styles and fix direction of style composition #145
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
Conversation
|
||
-- | Flatten a `PropsModifier` and extract the Emotion styles for use with `React.Basic.Emotion.element`. | ||
-- | This function is mainly used inside component implementations where the `LumiComponent` boundary | ||
-- | gives way to DOM components or other `ReactComponent`s. | ||
toCSS :: | ||
forall props. | ||
PropsModifier () -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spicydonuts Since we're forcing the monomorphization of StyleModifier
here we don't get any escaped skolem errors anymore :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent, thank you!
This PR has 3 main effects:
StyleModifier
alias, so that style modifiers cannot reference props anymore.styleModifier
andstyleModifier_
combinators to the less verbosestyle
andstyle_
.Now converting from style modifiers to Emotion's
Style
type is easy, since thetoCSS
function now just directly converts anyStyleModifier
toLumiTheme -> Emotion.Style
.