diff options
| author | jackyzha0 <[email protected]> | 2020-07-18 14:51:54 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2020-07-18 14:51:54 -0700 |
| commit | d80bc9f45c4ab06a8a8bc38fc436bb5345225514 (patch) | |
| tree | e4d0317c70fe487ec85530b65e51982ead61e80a /frontend/src/components/Options.js | |
| parent | refactor renderers (diff) | |
| download | ctrl-v-d80bc9f45c4ab06a8a8bc38fc436bb5345225514.tar.xz ctrl-v-d80bc9f45c4ab06a8a8bc38fc436bb5345225514.zip | |
refactor newpaste
Diffstat (limited to 'frontend/src/components/Options.js')
| -rw-r--r-- | frontend/src/components/Options.js | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/frontend/src/components/Options.js b/frontend/src/components/Options.js index 26391c1..09f92f3 100644 --- a/frontend/src/components/Options.js +++ b/frontend/src/components/Options.js @@ -14,25 +14,23 @@ const Flex = styled.div` } ` -class OptionsContainer extends React.Component { - render() { - return ( - <Flex> - <PassInput - value={this.props.pass} - onChange={this.props.onChange} - id="passwordInput" /> - <LangInput - value={this.props.lang} - onChange={this.props.onChange} - id="langInput" /> - <ExpiryInput - value={this.props.expiry} - onChange={this.props.onChange} - id="expiryInput" /> - </Flex> - ); - } +const OptionsContainer = ({pass, lang, expiry, onPassChange, onLangChange, onExpiryChange}) => { + return ( + <Flex> + <PassInput + value={pass} + onChange={onPassChange} + id="passwordInput" /> + <LangInput + value={lang} + onChange={onLangChange} + id="langInput" /> + <ExpiryInput + value={expiry} + onChange={onExpiryChange} + id="expiryInput" /> + </Flex> + ); } export default OptionsContainer
\ No newline at end of file |