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

Commit

Permalink
feat(FormInput): added kayboard and clipboard events to input
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsasaarela committed Aug 22, 2018
1 parent fa0f2aa commit 7bdefe9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/components/Form/FormInput.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import type {
MouseEvents,
PointerEvents,
FocusEvents,
KeyboardEvents,
ClipboardEvents,
} from "../../";

type FormStyle = {|
Expand Down Expand Up @@ -37,6 +39,8 @@ export type Props = {|
...MouseEvents,
...PointerEvents,
...FocusEvents,
...KeyboardEvents,
...ClipboardEvents,
+placeholder?: string,
+type?: "checkbox" | "radio" | "text" | "email" | "password",
+value?: string | number | boolean,
Expand Down Expand Up @@ -70,6 +74,12 @@ function FormInput(props: Props): React.Node {
onPointerLeave,
onFocus,
onBlur,
onKeyPress,
onKeyUp,
onKeyDown,
onCopy,
onCut,
onPaste,
disabled,
readOnly,
label,
Expand Down Expand Up @@ -105,6 +115,12 @@ function FormInput(props: Props): React.Node {
onPointerLeave,
onFocus,
onBlur,
onKeyPress,
onKeyUp,
onKeyDown,
onCopy,
onCut,
onPaste,
};

const contents = !icon ? (
Expand Down

0 comments on commit 7bdefe9

Please sign in to comment.