typography.js
typography.js copied to clipboard
React Native
I think Este needs this for React Native ASAP. Should not be hard. Universal typography FTW.
That'd be amazing!
Yeah, this should totally be doable. Reuse the same options values but create React Native specific styles.
Is your thought that this would just auto-create a bunch of components wrapping the <Text>
component? E.g. <H1>
, <H2>
, <Bold>
etc.?
Haven't really dived deep into React Native so not 100% on styling conventions there but would love to support this.
It'd be really amazing if there was a React Native Google Fonts plugin that'd auto-include fonts specified in the Typography.js theme.
BTW, in-progress screenshot of design tools. Goal is to completely design typography in-browser and then export to JS module.
All we need for the React Native are constants and common vocabulary for https://github.com/este/este/blob/master/src/common/app/theme.js
Then the helper for fonts.
Is your thought that this would just auto-create a bunch of components wrapping...
Not at all. https://twitter.com/estejs/status/757338696735653889 and https://twitter.com/estejs/status/757709752004710400
Ok, universal components then 💃
For now perhaps you just need a este-specific wrapper around typography's toJSON
function to pull out what you want — https://github.com/KyleAMathews/typography.js/blob/master/packages/typography/src/index.js#L66
So something like this?
import Typography from 'typography'
import funstonTheme from 'typography-theme-funston'
const typography = new Typography(funstonTheme)
export default esteTypographyWrapper(typography)
Yeah, something like that. Will investigate soon. Thank you.
any update on this?