Skip to content

Instantly share code, notes, and snippets.

@ryanpedersen42
Created September 2, 2019 02:18
Show Gist options
  • Select an option

  • Save ryanpedersen42/adb4ab6be30f048a45fc6a8d5060141c to your computer and use it in GitHub Desktop.

Select an option

Save ryanpedersen42/adb4ab6be30f048a45fc6a8d5060141c to your computer and use it in GitHub Desktop.
form-input.jsx
import React from 'react';
import './form-input.styles.scss';
const FormInput = ({ handleChange, label, ...otherProps }) => (
<div className='group'>
<input className='form-input' onChange={handleChange} {...otherProps} />
{label ? (
<label className='shrink form-input-label'>
{label}
</label>
) : null}
</div>
);
export default FormInput;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment