Closed vbylen closed 3 years ago
This is an issue from react-native-svg. Unfortunately, there doesn't seem to be a workaround. You'll have to wait until the issue is resolved.
It's not ideal, but you could apply the squircle shape to a normal View
with masked-view.
For me the issue was fixed by just manually looked up the color codes.
import { useColorScheme } from "react-native"
const theme = useColorScheme();
<SquircleView
style={style}
squircleParams={{
cornerSmoothing: 1,
cornerRadius: 20,
fillColor : theme == 'light' ? 'rgb(0, 122, 255)' : 'rgb(10, 132, 255)'
}}
/>
Works fine for my use case.
Thanks!
Glad you found a solution for your use case. Ideally, I think you still want to use PlatformColor
when react-native-svg
has support for it to make sure you get the correct native color.
I get the following error:
"[object Object]" is not a valid color or brush