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

AboveThumbComponent not centered #386

Open
amilchew opened this issue Jan 29, 2023 · 5 comments
Open

AboveThumbComponent not centered #386

amilchew opened this issue Jan 29, 2023 · 5 comments

Comments

@amilchew
Copy link

I am really excited about the new package, looks great!

However, the text for the AboveThumbComponent is not centred with the thumb. Changing the alignment doesn't help as well.

Also, I am using the AboveThumbComponent because the BelowThumbComponent is still not added to version 2.2.0. I saw that you've added it to the source code, but unfortunately, it's not in the npm.

@ArjunPatidarRadix
Copy link

same issue

@miblanchard
Copy link
Owner

@amilchew - Can you check for BelowThumbComponent in 2.3.0 from npm?

@amilchew
Copy link
Author

Hey, thank you for adding BellowThumbComponent! Unfortunately, both of the components don't render centred text. I had to set the text to be centred manually, using right 8 for a single-digit number (might not work for bigger numbers).

@dlinds
Copy link

dlinds commented Apr 20, 2023

For anyone else in the future, this worked for me to center above/below. I have some additional styling logic that accounts for the spacing for first and last item as well, as the strings I am using for myValueHere go outside the bounds of the component.

<View
      style={{
        right: "100%",
        width: "200%",
        alignItems: "center",
      }}
    >
      <Text>
        {myValueHere}
      </Text>
    </View>

@fbongcam
Copy link

temporary fix
left: "-50%"
on renderAboveComponent

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

5 participants