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
I am using fontawesome duotone SVG from remote URL. Is there a way to set the colour for different element separately?
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <defs> <style>.fa-secondary{opacity:.4}</style> </defs> <path class="fa-primary" d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0V512z"/> <path class="fa-secondary" d="M256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512V0z"/> </svg>
Thanks in advance!
The text was updated successfully, but these errors were encountered:
same problem
Sorry, something went wrong.
Hi, unfortunately, there's no easy solution. The only option is to create a local custom component instead. For example:
import * as React from 'react'; import Svg, {Path} from 'react-native-svg'; export const Icon = (props: {primary?: string; secondary?: string}) => ( <Svg viewBox="0 0 512 512"> <Path d="M256 512C114.6 512 0 397.4 0 256S114.6 0 256 0v512z" fill={props.primary} /> <Path d="M256 0c141.4 0 256 114.6 256 256S397.4 512 256 512V0z" fill={props.secondary} opacity={0.4} /> </Svg> );
SvgCss
Successfully merging a pull request may close this issue.
Question
I am using fontawesome duotone SVG from remote URL. Is there a way to set the colour for different element separately?
Thanks in advance!
The text was updated successfully, but these errors were encountered: