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

styled-components expect lineHeight to contain units #40

Open
thomasarbona opened this issue Feb 11, 2020 · 2 comments
Open

styled-components expect lineHeight to contain units #40

thomasarbona opened this issue Feb 11, 2020 · 2 comments

Comments

@thomasarbona
Copy link

I'm trying to use the library with styled-components as mentioned in this example.

The problem is that styled expect the lineHeight to contain units, but there is none. As we can see, for example, human.title1Object:

Object {
  "backgroundColor": "transparent",
  "color": "#000000",
  "fontFamily": "System",
  "fontSize": 28,
  "fontWeight": "400",
  "letterSpacing": 0.355469,
  "lineHeight": 34,
}

If I use the object like this:

export const Title1 = styled(props => <Text {...props} />)`
  ${human.title1Object};
`;

I get this:
86185357_210672296735122_7868388049141366784_n

Should I hack the library and add a unit to the object by myself or I'm missing something?

Thanks 👋

@ScreamZ
Copy link

ScreamZ commented Feb 11, 2020

Guess it's more related to styled component and especially https://github.com/styled-components/css-to-react-native lib

@LRNZ09
Copy link

LRNZ09 commented Aug 22, 2020

I resolved by using emotion instead

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

No branches or pull requests

3 participants