Skip to content

Commit

Permalink
fix: update Input icon props.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel910 committed Sep 6, 2019
1 parent ca12cbd commit 3ce7ac1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/ui/src/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type Props = FormComponentProps & {
inputRef?: React.Ref<any>,

// A leading icon. Use `<InputIcon/>` component.
leadingIcon?: React.Node,
icon?: React.Node,

// A trailing icon. Use `<InputIcon/>` component.
trailingIcon?: React.Node,
Expand Down Expand Up @@ -123,7 +123,7 @@ class Input extends React.Component<Props> {
outlined,
rows,
validation = { isValid: null },
leadingIcon,
icon,
trailingIcon,
box,
...props
Expand All @@ -136,7 +136,7 @@ class Input extends React.Component<Props> {

const boxValue = (
box ||
(!outlined && (Boolean(leadingIcon) || Boolean(trailingIcon)))
(!outlined && (Boolean(icon) || Boolean(trailingIcon)))
).toString();

return (
Expand All @@ -150,9 +150,9 @@ class Input extends React.Component<Props> {
onChange={this.onChange}
onBlur={this.onBlur}
label={label}
withLeadingIcon={leadingIcon}
icon={icon}
placeholder={(!label && placeholder) || undefined}
withTrailingIcon={trailingIcon}
trailingIcon={trailingIcon}
rows={this.props.rows}
/>

Expand Down

0 comments on commit 3ce7ac1

Please sign in to comment.