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

check icon not rendering on react native web #103

Open
louisholley opened this issue Jun 1, 2022 · 3 comments
Open

check icon not rendering on react native web #103

louisholley opened this issue Jun 1, 2022 · 3 comments
Assignees

Comments

@louisholley
Copy link

hey, thanks for this package it looks great! I've added it to a react native web project and the checkbox seems to toggle state correctly but no check icon is shown, so it's just a colour changing box currently...I've tried passing in an iconComponent but when i do that the iconComponent is always rendered, even when the box isn't checked

@WrathChaos WrathChaos self-assigned this Jun 1, 2022
@WrathChaos
Copy link
Owner

Hello @louisholley
I don't have any experience with react-native-web unfortunately :(

I would like to help if you can fix it I would love to take a look at the PR

@kyle-belle
Copy link

This happen for me even on android

@kyle-belle
Copy link

what i would recommend is just downloading a check icon png, even the one from this project, which is what i did and use it as the source. I created a thin wrapper which uses the downloaded check icon by default

src/Components/Common/BouncyCheckbox.tsx

import _BouncyCheckbox, {
  type IBouncyCheckboxProps,
} from 'react-native-bouncy-checkbox';
import CheckIcon from '@assets/Images/check.png'; // you can also use require here if you prefer or if importing images doesn't work for you

const BouncyCheckbox = ({
  checkIconImageSource = CheckIcon,
  ...props
}: IBouncyCheckboxProps) => {
  return (
    <_BouncyCheckbox checkIconImageSource={checkIconImageSource} {...props} />
  );
};

export {BouncyCheckbox};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants