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