Skip to content

Commit

Permalink
fix(TextInput): Fix font size for small text inputs (#5243)
Browse files Browse the repository at this point in the history
* fix(TextInput): Fix font size for small text inputs

* revert test change

* changeset

* test(vrt): update snapshots

---------

Co-authored-by: hussam-i-am <hussam-i-am@users.noreply.github.com>
  • Loading branch information
hussam-i-am and hussam-i-am authored Nov 6, 2024
1 parent 9ec5bb6 commit bc9c696
Show file tree
Hide file tree
Showing 17 changed files with 259 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-kiwis-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": minor
---

Fix small TextInput to be the use the correct font size
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions packages/react/src/__tests__/__snapshots__/TextInput.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,18 @@ exports[`TextInput renders small 1`] = `
}
}
@media screen and (min-width:544px) {
.c0 {
font-size: 12px;
}
}
@media screen and (min-width:768px) {
.c0 {
font-size: 12px;
}
}
<span
aria-busy={false}
className="c0 c1 TextInput-wrapper"
Expand Down Expand Up @@ -4173,6 +4185,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -4391,6 +4411,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -4647,6 +4675,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -4874,6 +4910,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -5175,6 +5219,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -5476,6 +5528,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -5771,6 +5831,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -6028,6 +6096,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -6323,6 +6399,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -6597,6 +6681,18 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
}
@media screen and (min-width:544px) {
.c0 {
font-size: 12px;
}
}
@media screen and (min-width:768px) {
.c0 {
font-size: 12px;
}
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -6938,6 +7034,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
}
Expand Down Expand Up @@ -7282,6 +7386,14 @@ exports[`TextInput renders with a loading indicator 1`] = `
}
@media screen and (min-width:544px) {
}
@media screen and (min-width:768px) {
}
@media (min-width:768px) {
.c0 {
font-size: 14px;
Expand Down
Loading

0 comments on commit bc9c696

Please sign in to comment.