From 5cd011faa220e0adc412b64874db03a933652b9b Mon Sep 17 00:00:00 2001 From: Bram Vanhoutte Date: Sat, 9 May 2020 10:10:52 +0200 Subject: [PATCH] fix: unify prop definition --- src/components/Button/Button.tsx | 2 +- src/components/Icon/Icon.tsx | 2 +- src/components/Input/Input.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index aa2b8dbc..60f30097 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -2,7 +2,7 @@ import React from 'react'; import styles from './Button.module.css'; -export interface Props { +interface Props { children: string; type: 'primary' | 'secondary'; onClick?: (event: React.MouseEvent) => void; diff --git a/src/components/Icon/Icon.tsx b/src/components/Icon/Icon.tsx index 75deaac2..e4929233 100644 --- a/src/components/Icon/Icon.tsx +++ b/src/components/Icon/Icon.tsx @@ -1,6 +1,6 @@ import React from 'react'; -export interface Props { +interface Props { color?: string; size?: string | number; } diff --git a/src/components/Input/Input.tsx b/src/components/Input/Input.tsx index 71025e85..735073bd 100644 --- a/src/components/Input/Input.tsx +++ b/src/components/Input/Input.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import styles from './Input.module.css'; -type Props = { +interface Props { name: string; value?: string; onChange?: ChangeEventHandler; @@ -14,7 +14,7 @@ type Props = { autoComplete?: boolean; maxLength?: number; className?: string; -}; +} const Input = React.forwardRef( (