Skip to content

Commit 9a8f729

Browse files
committed
chore: minor style fixes to suspense demo
1 parent ffa9f08 commit 9a8f729

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

examples/query/react/suspense/src/PokemonPlaceholder.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ export function PokemonPlaceholder({
2121

2222
let content: React.ReactNode = isError ? (
2323
<>
24-
<h3>An error has occurred while loading {name}</h3>
24+
<h3 className='alert__heading'>An error has occurred while loading {name}</h3>
2525
<div>{error?.message}</div>
2626
{onRetry && (
27-
<button type="button" className="btn" onClick={onRetry}>
27+
<button type="button" className="btn alert__btn" onClick={onRetry}>
2828
retry
2929
</button>
3030
)}
3131
{children}
3232
</>
3333
) : (
3434
<>
35-
<h3>Loading pokemon {name}</h3>
35+
<h3 className='alert__heading'>Loading pokemon {name}</h3>
3636
<br />
3737
(Suspense fallback)
3838
{children}

examples/query/react/suspense/src/styles.css

+21
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@
1111
--primary: #6c3eb7;
1212
}
1313

14+
hr {
15+
box-sizing: border-box;
16+
height: 2px;
17+
border: none;
18+
border-top: 2px solid var(--primary);
19+
}
20+
21+
22+
input[type="range"] {
23+
max-width: 100px;
24+
}
25+
1426
body {
1527
margin: 0;
1628
}
@@ -134,6 +146,15 @@ h3 {
134146
background: var(--danger-bg);
135147
}
136148

149+
.alert__heading {
150+
color: inherit;
151+
}
152+
153+
.alert__btn {
154+
color: inherit !important;
155+
border-color: currentColor;
156+
}
157+
137158
.alert--info {
138159
color: var(--info);
139160
background-color: var(--info-bg);

0 commit comments

Comments
 (0)