Skip to content

Instantly share code, notes, and snippets.

@grantglidewell
Created July 31, 2018 22:39
Show Gist options
  • Save grantglidewell/6f18bcb18ef81edaa179f0ad4bfbff9e to your computer and use it in GitHub Desktop.
Save grantglidewell/6f18bcb18ef81edaa179f0ad4bfbff9e to your computer and use it in GitHub Desktop.
Usage:
<Input name="name" placeholder="Name" disabled />
<Input
name="name"
autoComplete="off"
placeholder="Name (autocomplete disabled)"
/>
Code:
export function Input(props) {
if (props.disabled) {
props["disabled"] = "disabled";
}
return <input {...props} className={cx(styles.Input, props.className)} />;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment