Skip to content

Commit ae882cd

Browse files
committed
docs: Refine todo list styles
1 parent 47ad173 commit ae882cd

File tree

6 files changed

+14
-7
lines changed

6 files changed

+14
-7
lines changed

docs/core/api/useDebounce.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,18 @@ function IssueList({ query, owner, repo }) {
7676
const q = `${query} repo:${owner}/${repo}`;
7777
const response = useSuspense(issueQuery, { q });
7878
return (
79-
<div>
80-
<small>{response.total_count} results</small>
79+
<>
80+
<small style={{ display: 'block' }}>
81+
{response.total_count} results
82+
</small>
8183
{response.items.slice(0, 5).map(issue => (
8284
<div key={issue.pk()}>
8385
<a href={issue.html_url} target="_blank">
8486
{issue.title}
8587
</a>
8688
</div>
8789
))}
88-
</div>
90+
</>
8991
);
9092
}
9193
export default React.memo(IssueList) as typeof IssueList;
@@ -103,6 +105,7 @@ export default function SearchIssues() {
103105
return (
104106
<div>
105107
<TextInput
108+
spellCheck="false"
106109
placeholder="Search react issues"
107110
value={query}
108111
onChange={handleChange}

website/src/components/Playground/DesignSystem/CancelButton.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function CancelButton({ onClick }: { onClick?: () => void }) {
99
textAlign: 'right',
1010
}}
1111
>
12-
<span
12+
<div
1313
style={{ cursor: onClick ? 'pointer' : 'default' }}
1414
onClick={onClick}
1515
>
@@ -24,7 +24,7 @@ export function CancelButton({ onClick }: { onClick?: () => void }) {
2424
&nbsp;
2525
</div>
2626
}
27-
</span>
27+
</div>
2828
</div>
2929
);
3030
}

website/src/components/Playground/DesignSystem/TextInput.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function TextInput({
2222
})}
2323
>
2424
{children}
25-
<input spellCheck="false" className="rt-TextFieldInput" {...props} />
25+
<input className="rt-TextFieldInput" {...props} />
2626
{label ?
2727
<label className="rt-TextFieldLabel">{label}</label>
2828
: null}

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ html[data-theme='dark'] .small.rt-TextFieldRoot:focus-within {
110110
transition: all 0.2s ease-in-out; /* Quick animation for transitions */
111111
border-radius: 0;
112112
margin-bottom:0;
113+
margin-top:-4px;
113114
}
114115
html[data-theme='dark'] .small.rt-TextFieldRoot {
115116
background: none;
@@ -155,7 +156,7 @@ html[data-theme='dark'] .small.rt-TextFieldRoot {
155156
resize: vertical; /* Allow vertical resizing */
156157
min-height: 4em; /* Set a minimum height */
157158
box-sizing: border-box;
158-
margin-bottom: -8px;
159+
margin-bottom: -4px;
159160
}
160161

161162

website/src/components/Playground/styles.module.css

+2
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ div > .playgroundHeader.subtabs {
295295
}
296296
.playgroundPreview :global(.listItem) > label {
297297
flex: 1 1 100%;
298+
line-height: 1.1;
299+
margin-bottom: 4px;
298300
}
299301
.playgroundPreview :global(.listItem) > label input[type="text"] {
300302
width: calc(100% - 21px);

website/src/css/customTheme.css

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ html[data-theme='dark'] .docusaurus-highlight-code-line {
113113
small {
114114
/* google doesn't like anything smaller than 12 */
115115
font-size: 12px;
116+
line-height: 1;
116117
}
117118

118119
@media only screen and (max-width: 996px), (pointer: coarse) {

0 commit comments

Comments
 (0)