Skip to content

Commit

Permalink
Remove comments, add type for RenderProps in TextInput
Browse files Browse the repository at this point in the history
  • Loading branch information
pbitkowski committed Mar 18, 2019
1 parent 7541121 commit 7a905e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -78,7 +78,7 @@ class TextInput extends React.Component<TextInputProps, State> {
error: false,
multiline: false,
editable: true,
render: props => <NativeTextInput {...props} />,
render: (props: RenderProps) => <NativeTextInput {...props} />,
};

render() {
Expand Down
1 change: 0 additions & 1 deletion src/components/TextInput/TextInputFlat.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ class TextInputFlat extends React.Component<Props, State> {

return (
<View style={[containerStyle, style]}>
{/* When mode === 'flat', render an underline */}
<Animated.View
style={[
styles.underline,
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextInput/TextInputOutlined.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class TextInputOutlined extends React.Component<Props, State> {
/>

{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
Expand Down

0 comments on commit 7a905e7

Please sign in to comment.