From 7a905e7ec09e5d87257c2955cb6cc95a161a72f7 Mon Sep 17 00:00:00 2001 From: Prem Bitkowski Date: Tue, 12 Mar 2019 15:04:45 +0100 Subject: [PATCH] Remove comments, add type for RenderProps in TextInput --- src/components/TextInput/TextInput.js | 4 ++-- src/components/TextInput/TextInputFlat.js | 1 - src/components/TextInput/TextInputOutlined.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/TextInput/TextInput.js b/src/components/TextInput/TextInput.js index b5a20f075b..3f5df28a17 100644 --- a/src/components/TextInput/TextInput.js +++ b/src/components/TextInput/TextInput.js @@ -7,7 +7,7 @@ import { polyfill } from 'react-lifecycles-compat'; import TextInputOutlined from './TextInputOutlined'; import TextInputFlat from './TextInputFlat'; import { withTheme } from '../../core/theming'; -import type { Props } from './types'; +import type { Props, RenderProps } from './types'; type TextInputProps = {| ...Props, @@ -78,7 +78,7 @@ class TextInput extends React.Component { error: false, multiline: false, editable: true, - render: props => , + render: (props: RenderProps) => , }; render() { diff --git a/src/components/TextInput/TextInputFlat.js b/src/components/TextInput/TextInputFlat.js index 453f97c6cc..8440d2e432 100644 --- a/src/components/TextInput/TextInputFlat.js +++ b/src/components/TextInput/TextInputFlat.js @@ -325,7 +325,6 @@ class TextInputFlat extends React.Component { return ( - {/* When mode === 'flat', render an underline */} { /> {label ? ( - // When mode == 'outlined', the input label stays on top of the outline + // The input label stays on top of the outline // The background of the label covers the outline so it looks cut off // To achieve the effect, we position the actual label with a background on top of it // We set the color of the text to transparent so only the background is visible