sakshya73
sakshya73

Reputation: 7152

How to change background of the checkbox in unchecked state

In my react-native app (using native-base as the component library). I have been trying to change the background color of the checkbox in the unchecked state but the default white background is not changing.

enter image description here

react-native: "0.68.5" native-base: "3.0.3"

Upvotes: 1

Views: 245

Answers (1)

sakshya73
sakshya73

Reputation: 7152

After spending some time and trying out multiple ways I was able to find the solution.

Add this piece of code to your theme file, change the color you want and you are good to go.



  Checkbox: {
      baseStyle: {
        _checkbox: {
          bg: "#faf3de",
        },
      },
    },


Upvotes: 1

Related Questions