Skip to content

Commit 8943601

Browse files
committed
example: AsyncRendererExample: improve styles of rendered results
1 parent e0b2e0d commit 8943601

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

example/src/AsyncRendererExample.css

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@
22
* Copyright 2022 MFB Technologies, Inc.
33
*/
44

5-
.success {
6-
color: green
5+
.renderer-result {
6+
display: inline-block;
7+
padding: 2px 5px;
8+
}
9+
.info {
10+
color: white;
11+
background-color: blue;
712
}
8-
.info {
9-
color: blue;
13+
.loading {
14+
background-color: yellow;
15+
}
16+
.success {
17+
color: white;
18+
background-color: green
1019
}
1120
.error {
12-
color: red;
21+
background-color: red;
1322
}

example/src/AsyncRendererExample.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ export function AsyncRendererExample() {
3737
<div>
3838
{renderer((args) => {
3939
return (
40-
<p className='success'>{args.data}</p>
40+
<p className='renderer-result success'>{args.data}</p>
4141
)
4242
},
4343
{
44-
onInit: () => (<p className='info'>Waiting for long running process to start...</p>),
45-
onLoading: () => (<p className='info'>custom spinner...</p>),
46-
onCompletedWithError: (props) => (<p className='error'>{props.errorMessage ?? "error"}</p>)
44+
onInit: () => (<p className='renderer-result info'>Waiting for long running process to start...</p>),
45+
onLoading: () => (<p className='renderer-result loading'>custom spinner...</p>),
46+
onCompletedWithError: (props) => (<p className='renderer-result error'>{props.errorMessage ?? "error"}</p>)
4747
})}
4848
</div>
4949
</div>

0 commit comments

Comments
 (0)