Skip to content

Commit 966341e

Browse files
committed
docs: Improve colors of TextField
1 parent aa110be commit 966341e

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

docs/core/api/useDebounce.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ export default function SearchIssues() {
104104
<div>
105105
<TextInput
106106
placeholder="Search react issues"
107-
label="Search"
108107
value={query}
109108
onChange={handleChange}
110-
autoFocus
111109
loading={isPending}
110+
autoFocus
112111
large
113112
>
114113
<SearchIcon />

website/src/components/Playground/DesignSystem/design-system.css

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
html[data-theme='light'] .playground-preview {
2+
--ifm-color-formfield-active: var(--ifm-link-color);
3+
}
4+
html[data-theme='dark'] .playground-preview {
5+
--ifm-color-formfield-active: var(--ifm-link-color);
6+
}
7+
18
/* Root container for the text field */
29
.rt-TextFieldRoot {
310
display: flex;
@@ -10,6 +17,9 @@
1017
position: relative;
1118
font-size: 14px;
1219
}
20+
html[data-theme='dark'] .rt-TextFieldRoot {
21+
background-color: var(--ifm-color-emphasis-100);
22+
}
1323

1424
/* The slot element (left side) */
1525
.rt-SearchIcon {
@@ -40,7 +50,7 @@
4050
width: 16px;
4151
height: 16px;
4252
border: 2px solid var(--ifm-color-emphasis-400);
43-
border-top-color: #007AFF;
53+
border-top-color: var(--ifm-color-formfield-active);
4454
border-radius: 50%;
4555
animation: rt-spin 1s linear infinite;
4656
}
@@ -67,11 +77,11 @@
6777
/* Focus state for the text field */
6878
.rt-TextFieldInput:focus + .rt-TextFieldLabel,
6979
.rt-TextFieldInput:not(:placeholder-shown) + .rt-TextFieldLabel {
70-
color: #007AFF;
80+
color: var(--ifm-color-formfield-active);
7181
}
7282

7383
.rt-TextFieldRoot:focus-within {
74-
border-color: #007AFF;
84+
border-color: var(--ifm-color-formfield-active);
7585
}
7686

7787

0 commit comments

Comments
 (0)