Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(Search): several cleanups #1150

Merged
merged 1 commit into from
Jan 16, 2017
Merged

style(Search): several cleanups #1150

merged 1 commit into from
Jan 16, 2017

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Jan 12, 2017

I missed the moment when #1123 was merged, so I'll make several style cleanups in this PR.

This PR:

@@ -34,6 +34,7 @@ interface SearchProps extends ReactMouseEvents<HTMLInputElement>, ReactFocusEven
/** Shorthand for Icon. */
icon?: any;

/** A search can show a loading indicator. */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added inline comment to prop.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, we should also update the ts file comment as well.

'search',
className,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

className is always last in our pattern.

{menuContent}
</SearchResults>
)
return <SearchResults className={resultsClasses}>{menuContent}</SearchResults>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This expression is too simple to be multiline.

icon,
})
)
return Input.create(input, {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really need parens there.

@@ -169,17 +169,19 @@ export default class Search extends Component {
/** A search input can take up the width of its container. */
input: customPropTypes.itemShorthand,

size: PropTypes.oneOf(_meta.props.size),

/** A search can show a loading indicator. */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also update the ts file.

loading: PropTypes.bool,

/** A search can have different sizes. */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ 😄

style(Search): propTypes cleanups, update comments
@layershifter
Copy link
Member Author

I've updated ts-definition file and updated propTypes for #524.

@codecov-io
Copy link

Current coverage is 95.88% (diff: 100%)

No coverage report found for master at b7ffa6a.

Powered by Codecov. Last update b7ffa6a...c3c6e65

@levithomason levithomason merged commit fc37d54 into master Jan 16, 2017
@levithomason levithomason deleted the styte/search branch January 16, 2017 17:03
@levithomason
Copy link
Member

Thanks much!

@levithomason
Copy link
Member

Released in [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants