react-native-ui-kitten icon indicating copy to clipboard operation
react-native-ui-kitten copied to clipboard

Third Party Icons do not render

Open dvdprr6 opened this issue 2 years ago • 0 comments

🐛 Bug Report

Third party icons do not render. image

I have followed the Third Party Icon guide found here,

This is how I am registering the Feather Icons Pack

function FeatherIcon({ name, style }){
  const { height, tintColor, ...iconStyle } = StyleSheet.flatten(style)

  return <Icon name={name} size={height} color={tintColor} style={iconStyle} />
}

const IconProvider = (name: any) => ({
  toReactElement: (props: any) => FeatherIcon({ name, ...props })
})

function createIconsMap() {
  return new Proxy({}, {
    get(target, name) {
      return IconProvider(name);
    },
  });
}

const FeatherIconsPack = {
  name: 'feather',
  icons: createIconsMap()
}

const App = () => {

  return (
    <Provider store={store}>
      <IconRegistry icons={FeatherIconsPack}/*icons={EvaIconsPack}*/ />
      <ApplicationProvider {...eva} theme={{ ...eva.dark, ...theme2}}>
        <Stack />
      </ApplicationProvider>
    </Provider>
  )
}

export default App

This is how I am applying the icons

const BottomTabBar: FC<{ navigation: any, state: any }> = (props) => {
  const { navigation, state } = props

  return (
    <BottomNavigation
      selectedIndex={state.index}
      onSelect={(index: React.ReactText) => navigation.navigate(state.routeNames[index])}
      appearance={'noIndicator'}
    >
      <BottomNavigationTab icon={props => <Icon {...props}  name={'facebook'} />} />
      <BottomNavigationTab icon={props => <Icon {...props} name={'facebook'} />} />
      <BottomNavigationTab icon={props => <Icon {...props} name={'facebook'} /> } />
    </BottomNavigation>
  )
}

I also tried with Material Icons but I run into the same problem.

Any help would be greatly appreciated.

To Reproduce

Steps to reproduce the behavior:

Expected behavior

Link to runnable example or repository (highly encouraged)

UI Kitten and Eva version

Package Version
@eva-design/eva ^2.2.1
@ui-kitten/components ^5.1.1

Environment information

  System:
    OS: Linux 5.16 Pop!_OS 21.10
    CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
  Binaries:
    Node: 16.13.2 - /usr/local/bin/node/bin/node
    npm: 8.4.1 - /usr/local/bin/node/bin/npm
  SDKs:
    Android SDK:
      API Levels: 26, 27, 28, 29, 30
      Build Tools: 27.0.3, 29.0.2, 30.0.2, 30.0.3, 33.0.0
      System Images: android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-Tiramisu | Google APIs Intel x86 Atom_64
  npmPackages:
    react: 17.0.2 => 17.0.2 
    react-native: 0.67.2 => 0.67.2 

dvdprr6 avatar Mar 29 '22 01:03 dvdprr6