Closed SMhdAsadi closed 2 years ago
does it work if you pass a string but not an array? could you make an expo snack?
It is easy to reproduce this issue:
import React from 'react';
import {View, Text, makeTheme, DripsyProvider} from 'dripsy';
const theme = makeTheme({});
function App() { return (
); }
export default App;
You will then see this error on iOS simulator:
<img alt="simulator_screenshot" src="https://user-images.githubusercontent.com/63557556/182022803-cf1a955c-e87e-45db-b1b7-6af22244c677.png" width="40%" />
I've tried 'small-caps' both as a string and a single value array. None of them work.
If I change sx to style, small-caps works perfectly.
p.s. this is the [snack](https://snack.expo.dev/@smhdasadi/dripsyfontvarianterror).
Fixed in 3.7.4
. The issue was that fontVariant
was an array. Let me know if that works!
@nandorojo Just a heads up that this is still not working for me with the latest Dripsy. Tried passing down fontVariant
via sx
and it was crashing on the iOS simulator (either by string or array).
Had to go with @SMhdAsadi's workaround and set it via style
instead.
I can't use fontVariant: ['small-caps'] in sx prop. This causes below error on iOS simulator:
In Android app crashes with this log:
But I can use this in plain style prop. Initially I've tested fontVariant inside a text variant in my theme and the same error was showing. How can I use fontVariant with dripsy?
ReactNative version: 0.69.2 Dripsy version: 3.6.0