Download wp-calypso/client/components/forms/form-text-input-with-affixes/index.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 793 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/forms/form-text-input-with-affixes/index.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/forms/form-text-input-with-affixes/index.jsx
-
curl -L -o index.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/forms/form-text-input-with-affixes/index.jsx
793 Bytes
| import clsx from 'clsx'; | |
| import PropTypes from 'prop-types'; | |
| import { Component } from 'react'; | |
| import FormTextInput from 'calypso/components/forms/form-text-input'; | |
| import './style.scss'; | |
| export default class extends Component { | |
| static displayName = 'FormTextInputWithAffixes'; | |
| static propTypes = { | |
| noWrap: PropTypes.bool, | |
| prefix: PropTypes.node, | |
| suffix: PropTypes.node, | |
| }; | |
| render() { | |
| const { noWrap, prefix, suffix, ...rest } = this.props; | |
| return ( | |
| <div className={ clsx( 'form-text-input-with-affixes', { 'no-wrap': noWrap } ) }> | |
| { prefix && <span className="form-text-input-with-affixes__prefix">{ prefix }</span> } | |
| <FormTextInput { ...rest } /> | |
| { suffix && <span className="form-text-input-with-affixes__suffix">{ suffix }</span> } | |
| </div> | |
| ); | |
| } | |
| } | |