gluestack-ui
gluestack-ui copied to clipboard
The colors item does not exist for the LinearGradient.
Description
The colors item does not exist for the LinearGradient.
CodeSandbox/Snack link
No response
Steps to reproduce
An error occurs when using LinearGradient to specify colors.
<LinearGradient
colors={["#fff", "#F37C62"]} <-- error
w={layout.rw(168)}
aspectRatio={1}
borderRadius={layout.rw(100)}
justifyContent="center"
alignItems="center"
>
I get the same error when I use the official documentation code.
Is there something I'm doing wrong?
<VStack alignItems="center" space="lg">
<LinearGradient
p="$16"
colors={['$purple400', '$blue400', '$pink300']} <-- error
borderRadius="$md" start= {[1,1]}
end= {[0, 1]}
>
gluestack-ui Version
1.0.33
Platform
- [X] Expo
- [ ] React Native CLI
- [ ] Next
- [ ] Web
- [X] Android
- [ ] iOS
Other Platform
No response
Additional Information
No response
Hey @k22pr, Thanks for reporting the issue. We will look into it.
I get the same error, it comes from the DimensionValue type not accepting Number[] or String[] values. Happens the same with start and end prop types.