callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.5k stars 2.05k forks source link

CheckboxAndroid and CheckboxIOS use MaterialCommunityIcon instead of custom icon function from PaperProvider #4255

Open jahirfiquitiva opened 6 months ago

jahirfiquitiva commented 6 months ago

Current behaviour

I have setup a custom icon in PaperProvider

import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome';
...
 <PaperProvider
    settings={{
        icon: props => <FontAwesomeIcon {...props} icon={props.name} />
    }}>
        // ...
  </PaperProvider>

But CheckboxAndroid and CheckboxIOS only use MaterialCommunityIcon instead of the icon function from the PaperProvider

https://github.com/callstack/react-native-paper/blob/d6b6b667dec9d9d47a8e7ad3afbbd48289b31971/src/components/Checkbox/CheckboxAndroid.tsx#L135

Expected behaviour

CheckboxAndroid and CheckboxIOS should use Icon instead of MaterialCommunityIcon for the check icons.

How to reproduce?

https://snack.expo.dev/@jahirfiquitiva/greedy-yellow-turkish-delight

Preview

What have you tried so far?

Your Environment

software version
ios 17.0.1
android x
react-native 0.72.6
react-native-paper 5.11.6
node v18.18.2
npm or yarn 4.0.1
expo sdk x.x.x
bhandanyan-nomad commented 3 months ago

@lukewalczak