Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
feat(Form): Setting up autocomplete in Form.
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronCoplan committed Nov 28, 2018
1 parent 313e14a commit cb9d5b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Form/Form.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export type Props = {|
+className?: string,
+action?: string,
+method?: string,
+autocomplete?: "on" | "off",
|};

function Form({
Expand All @@ -45,14 +46,20 @@ function Form({
action,
method,
onSubmit,
autocomplete,
}: Props): React.Node {
// default for autocomplete is "off" if not passed in explicitly
if (!autocomplete) {
autocomplete = "off";
}
const classes = cn(className);
return (
<form
className={classes}
onSubmit={onSubmit}
action={action}
method={method}
autocomplete={autocomplete}
>
{children}
</form>
Expand Down

0 comments on commit cb9d5b6

Please sign in to comment.