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
Text input tweaks ✨ #652
Text input tweaks ✨ #652
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/primer/primer-components/nqmr9cqz6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
const inputClasses = classnames(icon ? 'input-icon' : 'input-no-icon') | ||
const hasIcon = !!icon | ||
const wrapperProps = pick(rest) | ||
const inputProps = omit(rest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's extremely useful for wrapper components like this!!
This PR cleans up a few things around the
TextInput
andFilteredSearch
components.FilteredSearch
docs to make sure users are aware that the component must be used with aTextInput
andDropdown
in order for it to work correctlyTextInput
input-icon
&input-no-icon
classesinput
type="search"
from docs - we usetype="text"
on GitHub.comWrapper
element, usesomit
andpick
from@styled-system/props
to pass the appropriate props to theWrapper
andInput
. This fixes a bunch of issues with havingCOMMON
on the input (margin getting applied in the wrong place, etc).