Download src/components/forms/input.jsx from soiz1/s4s-paint: direct link, hf CLI and curl.
- Browser
- Download file 996 Bytes
-
https://huggingface.co/datasets/soiz1/s4s-paint/resolve/main/src/components/forms/input.jsx
- Command line
-
hf download hf://datasets/soiz1/s4s-paint/src/components/forms/input.jsx
-
curl -L -o input.jsx https://huggingface.co/datasets/soiz1/s4s-paint/resolve/main/src/components/forms/input.jsx
996 Bytes
| /* DO NOT EDIT | |
| @todo This file is copied from GUI and should be pulled out into a shared library. | |
| See https://github.com/LLK/scratch-paint/issues/13 */ | |
| /* NOTE: | |
| Edited to add range prop | |
| */ | |
| import PropTypes from 'prop-types'; | |
| import React from 'react'; | |
| import classNames from 'classnames'; | |
| import styles from './input.css'; | |
| const Input = props => { | |
| const {small, range, ...componentProps} = props; | |
| return ( | |
| <input | |
| {...componentProps} | |
| className={classNames( | |
| styles.inputForm, | |
| props.className, | |
| { | |
| [styles.inputSmall]: small && !range, | |
| [styles.inputSmallRange]: small && range | |
| } | |
| )} | |
| /> | |
| ); | |
| }; | |
| Input.propTypes = { | |
| className: PropTypes.string, | |
| range: PropTypes.bool, | |
| small: PropTypes.bool | |
| }; | |
| Input.defaultProps = { | |
| range: false, | |
| small: false | |
| }; | |
| export default Input; | |