I want to pass props color to a icon child.
This <Feather /> I want to add color as props
This is my component and the Feather child
import { Feather } from '@expo/vector-icons'
export default class CloseButton extends React.PureComponent {
render () {
const { style, ...props } = this.props
return (
<TouchableOpacity style={styles.close} link {...props} >
<Feather name='x' size={26} /> // <-- want add color here
</TouchableOpacity>
)
}
}
This is my component where I send props thas show in ThouchableOpacity
<Alert.CloseButton onPress={props.onRequestClose} />
How can pass color in this props and it only show on icon?