We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I attempt to fill a polygon with a linear gradient, I just get the following error:
The examples only use Ellipse, so I don't know if this is only supported on non-polygon elements, or if this is a bug.
My code is as follows:
import React, { View } from 'react-native' import { Svg, Defs, LinearGradient, Stop, G, Polygon } from 'react-native-svg' export function BlueShard (props) { return ( <View style={props.style}> <Svg width="15" height="71"> <Defs> <LinearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="blue-gradient"> <Stop stopColor="#6ABAD5" stopOpacity="1" offset="0%" /> <Stop stopColor="#1E9FD6" stopOpacity="1" offset="100%" /> </LinearGradient> </Defs> <Polygon fill="url(#blue-gradient)" points='0,0 15,0 0,71' /> </Svg> </View> ) }
The text was updated successfully, but these errors were encountered:
Use id="blueGradient" you should use camel case in React. It's a bug when parsing full or stroke like url(#xxx-xxx) I'll fix this later.
Sorry, something went wrong.
That worked, thanks!
1bbcb73
No branches or pull requests
When I attempt to fill a polygon with a linear gradient, I just get the following error:
The examples only use Ellipse, so I don't know if this is only supported on non-polygon elements, or if this is a bug.
My code is as follows:
The text was updated successfully, but these errors were encountered: