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 to label the sliders #49

Open
Jake-Mulhern opened this issue Oct 13, 2022 · 1 comment
Open

How to label the sliders #49

Jake-Mulhern opened this issue Oct 13, 2022 · 1 comment

Comments

@Jake-Mulhern
Copy link

Jake-Mulhern commented Oct 13, 2022

I would like to label each of the sliders so that users can tell what each one controls.

How would I do this so that I can change the text that appears above each individual slider? Here is my code so far.

<ColorPicker
      sliderComponent={renderSliderComponent}
      onColorSelected={color => alert(`Color selected: ${color}`)}
      onColorChange={color => setNewPaletteColor(fromHsv(color))}
      style={{ flex: 1, height: 400, width: 300 }}
      defaultColor={selectedColor}
/>
const renderSliderComponent = () => {
    return (
      <View>
        <Text>Testing</Text>
        <Slider 
          minimumTrackTintColor={theme.colors.medium}
        />
      </View>
    )
  }
@sodik82
Copy link
Contributor

sodik82 commented Oct 13, 2022

I guess there is no straight-forward solution. But you can still use hideSliders=true and render the sliders yourself and use controlled version of the component.

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