Download wp-calypso/client/components/forms/range/docs/example.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 579 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/forms/range/docs/example.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/forms/range/docs/example.jsx
-
curl -L -o example.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/forms/range/docs/example.jsx
579 Bytes
| import { Gridicon } from '@automattic/components'; | |
| import { PureComponent } from 'react'; | |
| import FormRange from '../'; | |
| export default class extends PureComponent { | |
| static displayName = 'Ranges'; | |
| state = { | |
| rangeValue: 24, | |
| }; | |
| onChange = ( event ) => { | |
| this.setState( { | |
| rangeValue: event.target.value, | |
| } ); | |
| }; | |
| render() { | |
| return ( | |
| <FormRange | |
| minContent={ <Gridicon icon="minus-small" /> } | |
| maxContent={ <Gridicon icon="plus-small" /> } | |
| max="100" | |
| value={ this.state.rangeValue } | |
| onChange={ this.onChange } | |
| showValueLabel | |
| /> | |
| ); | |
| } | |
| } | |