-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(TextInput): Convert TextInput (Part 4) - TextInputAction & TextI…
…nputInnerVisualSlot (#5276) * feat(TextInput): Convert TextInput (Part 4) - Update TextInputAction & TextInputInnerVisualSlot * Changeset
- Loading branch information
1 parent
346ad0c
commit d91dc54
Showing
5 changed files
with
113 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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 | ||
--- | ||
|
||
Migrate TextInputAction & TextInputInnerVisualSlot to CSS Modules behind feature flag |
31 changes: 31 additions & 0 deletions
31
packages/react/src/internal/components/TextInputInnerAction.module.css
This file contains 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,31 @@ | ||
.Invisible { | ||
position: relative; | ||
padding-top: var(--base-size-2); | ||
padding-right: var(--base-size-4); | ||
padding-bottom: var(--base-size-2); | ||
padding-left: var(--base-size-4); | ||
color: var(--fgColor-muted); | ||
background-color: transparent; | ||
|
||
&:hover, | ||
&:focus { | ||
color: var(--fgColor-default); | ||
} | ||
|
||
&[data-component='IconButton'] { | ||
width: var(--inner-action-size); | ||
height: var(--inner-action-size); | ||
} | ||
|
||
@media (pointer: coarse) { | ||
::after { | ||
position: absolute; | ||
top: 50%; | ||
right: 0; | ||
left: 0; | ||
min-height: 44px; | ||
content: ''; | ||
transform: translateY(-50%); | ||
} | ||
} | ||
} |
This file contains 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
19 changes: 19 additions & 0 deletions
19
packages/react/src/internal/components/TextInputInnerVisualSlot.module.css
This file contains 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,19 @@ | ||
.Spinner { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
max-width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.SpinnerLeading { | ||
left: 0; | ||
} | ||
|
||
.SpinnerHidden { | ||
visibility: hidden; | ||
} | ||
|
||
.SpinnerVisible { | ||
visibility: visible; | ||
} |
This file contains 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