-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP linaria typography prototype #218
Conversation
const TypographyComponent = styledComponentFromSize(size); | ||
return ( | ||
<TypographyComponent | ||
as={as || elementFromSize(size)} |
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.
pulled this from the Along component, but I can't tell how it works 🤔
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.
Are you referring to the as
prop, specifically?
If so, as
is a prop from styled-components, so I wouldn't expect it to work here.
The intent is that someone can specify that they want something to look like an h2 (or h1, h3, whatever), but actually be something else (to fit into the document structure).
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.
ohhh ok that makes much more sense. I was going crazy trying to figure out where as
was actually being implemented
size: TypographySize; | ||
}; | ||
|
||
const typography = styled.span` |
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.
Linaria has a couple different APIs, and it would be interesting to think about which ones we want to use (and when, and why).
00f9bb4
to
ae1184e
Compare
@@ -0,0 +1,17 @@ | |||
{ |
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.
these are from #207 -- still planning to land separately, but I had to update the base branch since I split the linaria/twin.macro imports to another PR
63c6d7f
to
371152e
Compare
ae1184e
to
db90cb7
Compare
2486ff9
to
22a6cbb
Compare
revisit when we switch to linaria + twin.macro |
Summary:
haven't set up Babel or anything so
npm start
doesn't work yet :')Test Plan: