Download src/components/forms/label.jsx from soiz1/s4s-paint: direct link, hf CLI and curl.
- Browser
- Download file 767 Bytes
-
https://huggingface.co/datasets/soiz1/s4s-paint/resolve/main/src/components/forms/label.jsx
- Command line
-
hf download hf://datasets/soiz1/s4s-paint/src/components/forms/label.jsx
-
curl -L -o label.jsx https://huggingface.co/datasets/soiz1/s4s-paint/resolve/main/src/components/forms/label.jsx
767 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 */ | |
| import PropTypes from 'prop-types'; | |
| import React from 'react'; | |
| import styles from './label.css'; | |
| const Label = props => ( | |
| <label className={styles.inputGroup}> | |
| <span className={props.secondary ? styles.inputLabelSecondary : styles.inputLabel} style={props.style}> | |
| {props.text} | |
| </span> | |
| {props.children} | |
| </label> | |
| ); | |
| Label.propTypes = { | |
| children: PropTypes.node, | |
| secondary: PropTypes.bool, | |
| text: PropTypes.string.isRequired, | |
| style: PropTypes.object | |
| }; | |
| Label.defaultProps = { | |
| secondary: false | |
| }; | |
| export default Label; | |