-
Notifications
You must be signed in to change notification settings - Fork 616
Add trailingAction to TextInput #1947
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
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
c9f34f1
adds loading indicator to text inputs
mperrotti 26976c7
removes style debugging div
mperrotti 5157087
updates stories and docs
mperrotti 258ed6c
updates tests
mperrotti 245b568
fixes silly test mistakes
mperrotti 6c1f358
revert default textinput story
mperrotti 81a1022
adds changeset
mperrotti 89b0e44
Merge branch 'main' into mp/text-input-loading-state
mperrotti e964c11
Merge branch 'main' of github.com:primer/react into mp/text-input-loa…
mperrotti 5388500
Update src/TextInput.tsx
mperrotti 0473333
Merge branch 'mp/text-input-loading-state' of github.com:primer/react…
mperrotti 070612f
updates component API
mperrotti 097e8fb
adds trailing action to text input, tweaks formcontrol
mperrotti f2f52c7
Merge branch 'main' of github.com:primer/react into mp/text-input-loa…
mperrotti 79fbe76
addresses PR feedback
mperrotti 4a4fcc0
fixes linting error
mperrotti 1bdf6d1
indicate a busy status to assistive technology
mperrotti 5f14db8
Merge branch 'main' of github.com:primer/react into mp/text-input-loa…
mperrotti 3464982
updates snaps
mperrotti d586a80
renames 'isLoading' prop to 'loading'
mperrotti ced3de3
Merge branch 'main' of github.com:primer/react into mp/text-input-loa…
mperrotti 8bc639e
Update docs/content/TextInput.mdx
mperrotti eebc472
Update docs/content/TextInput.mdx
mperrotti 2b18aee
Update docs/content/TextInput.mdx
mperrotti 52d2e1a
Update docs/content/TextInput.mdx
mperrotti 5cfc485
Update docs/content/TextInput.mdx
mperrotti fc0eeef
Merge branch 'main' of github.com:primer/react into mp/text-input-loa…
mperrotti 8bf281d
updates snapshots
mperrotti e785ccd
nests examples under an 'Examples' heading
mperrotti a3dc21d
export TextInput non-pass-through props
mperrotti fffa764
fix undefined type usage
mperrotti f9ad318
fixes story types
mperrotti 18d6135
Merge branch 'mp/text-input-loading-state' of github.com:primer/react…
mperrotti 3f6b35e
rm unnecessary width style from formcontrol, fix formcontrol import
mperrotti 8af0c07
Merge branch 'main' of github.com:primer/react into mp/text-input-tra…
mperrotti 16ad284
rm forgotten comment
mperrotti ac012f1
adds changeset
mperrotti e94c13c
silences linting error and rms bad imports
mperrotti 2781e4c
Merge branch 'main' of github.com:primer/react into mp/text-input-tra…
mperrotti 46f1daf
addresses PR feedback
mperrotti 0dabb66
rms redundant stories
mperrotti 5781c4d
removes excess right padding when we pass 'trailingAction' and 'loading'
mperrotti 12c5f76
Merge branch 'main' into mp/text-input-trailing-action
mperrotti b26b765
change iconLabel to aria-label in docs example
mperrotti f573158
Merge branch 'main' of github.com:primer/react into mp/text-input-tra…
mperrotti 1339d9d
Merge branch 'mp/text-input-trailing-action' of github.com:primer/rea…
mperrotti 6d1e442
empy commit to make CI run
mperrotti 641a276
Merge branch 'main' into mp/text-input-trailing-action
mperrotti b1d60a2
disable html-addon to prevent Storybook from timing out Chromatic
mperrotti a16fb1b
Merge branch 'mp/text-input-trailing-action' of github.com:primer/rea…
mperrotti e73b569
Merge branch 'main' into mp/text-input-trailing-action
mperrotti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': minor | ||
--- | ||
|
||
Adds the option to render a trailing action inside of the TextInput component |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ const InputLabel: React.FC<Props & SxProp> = ({children, disabled, required, vis | |
display: 'block', | ||
color: disabled ? 'fg.muted' : 'fg.default', | ||
cursor: disabled ? 'default' : 'pointer', | ||
alignSelf: 'flex-start', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not relevant to this PR. I just noticed the label was clickable even if the user's cursor wasn't on the text. |
||
...sx | ||
}} | ||
> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is the only thing that was added. The rest of the changes are just indentation.
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.
Could we add a props table for
TextInput.Action
?