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

How do i padding for trackbar #20

Open
hungdev opened this issue Dec 13, 2022 · 1 comment
Open

How do i padding for trackbar #20

hungdev opened this issue Dec 13, 2022 · 1 comment

Comments

@hungdev
Copy link

hungdev commented Dec 13, 2022

Thank you for your lib @mymai91
I would like to make toggle like this:
image

I tried with padding: 3px in trackBarStyle and trackBar, but it's not working.
Please tell me how to do it.
Here is my code:

      <Toggle
        value={value}
        onPress={onChange}
        trackBar={{
          width: 40,
        }}
        trackBarStyle={{ height: 24, width: 40, backgroundColor: Colors.PrimaryBlueBlizzardBlue }}
        thumbButton={{ height: 18, width: 18, radius: 9 }}
        thumbStyle={{ backgroundColor: Colors.white }}
      />

Thank you so much <3

@Shannor
Copy link

Shannor commented Mar 6, 2023

@hungdev Hey, not sure if you still have this issue but I ran into wanting to do this as well. I ended up just adding a wrapper container around the toggle and adding the padding on it and matching the background color of the wrapper and the trackBar.

May not work in your case but was the easiest solution for me.

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

No branches or pull requests

2 participants