Closed TikiTDO closed 1 month ago
you can use like this
import {toStyleSheet} from 'styled-components/native';
@krudos Are you sure about that?
I tried checking if it's just the types, but even ignoring the type errors I don't see that sort of import:
Ah, I'm out of date. That would do it.
This function could be useful in a ReactNative app when doing something like this:
At the moment we have to keep a part of our styles config using
StyleSheet.create
because there's a few places that are not handled by the styled-component magic interpolation.If this function was available to import, then it would allow us to use the same styling rules everywhere.
If this is acceptable then I can submit a PR.