Skip to content

Instantly share code, notes, and snippets.

@xcoderzach
Created January 11, 2017 17:36
Show Gist options
  • Save xcoderzach/5300ec48dafefc5f8bf251ab886f4a24 to your computer and use it in GitHub Desktop.
Save xcoderzach/5300ec48dafefc5f8bf251ab886f4a24 to your computer and use it in GitHub Desktop.
import ComponentProvider from './component-provider'
const SliderNumber = styled.div`
position: absolute;
top: 0;
text-align: center;
`
const sliderTheme = ({ SliderHandle }) => {
return {
SliderHandle: (props) => {
<SliderHandle {...props}>
<SliderNumber>{props.value}</SliderNumber>
</SliderHandle>
}
}
export default (props) => {
<ComponentProvider theme={sliderTheme}>
<SimpleSlider startValue={10} stopValue={20} min={0} max={50} />
<ComponentProvider>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment