Skip to content
New issue

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

using with nativewind #42

Open
iamhaaamed opened this issue Dec 6, 2022 · 0 comments
Open

using with nativewind #42

iamhaaamed opened this issue Dec 6, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@iamhaaamed
Copy link

Is it possible to use react-icomoon with nativewind?
I have used it like this:

import { styled } from 'nativewind';
import * as React from 'react';
import type { IconProps } from 'react-icomoon';
import IcoMoon from 'react-icomoon';
import { Path, Svg } from 'react-native-svg';

import iconSet from './selection.json';

const SIcoMoon = styled(IcoMoon);
export type NTIconProps = IconProps & {
  className?: string;
};

export const Icon = ({ className, style, ...props }: NTIconProps) => {
  return (
    <SIcoMoon
      native
      SvgComponent={Svg}
      PathComponent={Path}
      iconSet={iconSet}
      size={20}
      style={style}
      className={className}
      {...props}
    />
  );
};

but neither class nor style works for react-icomoon. I have used nativewind with react native built-in components and also other components like fast image and it's working but not with react-icomoon.

@aykutkardas aykutkardas self-assigned this Feb 13, 2023
@aykutkardas aykutkardas added the enhancement New feature or request label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants