Commit d4536b0 1 parent 28fa8cc commit d4536b0 Copy full SHA for d4536b0
File tree 2 files changed +54
-38
lines changed
docs/data/joy/components/linear-progress
2 files changed +54
-38
lines changed Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import LinearProgress from '@mui/joy/LinearProgress' ;
3
3
import Typography from '@mui/joy/Typography' ;
4
+ import Box from '@mui/joy/Box' ;
4
5
5
6
export default function LinearProgressWithLabel ( ) {
6
7
const [ progress , setProgress ] = React . useState ( 0 ) ;
@@ -16,28 +17,35 @@ export default function LinearProgressWithLabel() {
16
17
} , [ ] ) ;
17
18
18
19
return (
19
- < LinearProgress
20
- determinate
21
- variant = "outlined"
22
- color = "neutral"
23
- size = "sm"
24
- thickness = { 32 }
25
- value = { progress }
20
+ < Box
26
21
sx = { {
27
- '--LinearProgress-radius' : '0px' ,
28
- '--LinearProgress-progressThickness' : '24px' ,
29
- boxShadow : 'sm' ,
30
- borderColor : 'neutral.500' ,
22
+ bgcolor : 'white' ,
23
+ width : '100%' ,
31
24
} }
32
25
>
33
- < Typography
34
- level = "body-xs"
35
- fontWeight = "xl"
36
- textColor = "common.white"
37
- sx = { { mixBlendMode : 'difference' } }
26
+ < LinearProgress
27
+ determinate
28
+ variant = "outlined"
29
+ color = "neutral"
30
+ size = "sm"
31
+ thickness = { 32 }
32
+ value = { progress }
33
+ sx = { {
34
+ '--LinearProgress-radius' : '0px' ,
35
+ '--LinearProgress-progressThickness' : '24px' ,
36
+ boxShadow : 'sm' ,
37
+ borderColor : 'neutral.500' ,
38
+ } }
38
39
>
39
- LOADING… { `${ Math . round ( progress ) } %` }
40
- </ Typography >
41
- </ LinearProgress >
40
+ < Typography
41
+ level = "body-xs"
42
+ fontWeight = "xl"
43
+ textColor = "common.white"
44
+ sx = { { mixBlendMode : 'difference' } }
45
+ >
46
+ LOADING… { `${ Math . round ( progress ) } %` }
47
+ </ Typography >
48
+ </ LinearProgress >
49
+ </ Box >
42
50
) ;
43
51
}
Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import LinearProgress from '@mui/joy/LinearProgress' ;
3
3
import Typography from '@mui/joy/Typography' ;
4
+ import Box from '@mui/joy/Box' ;
4
5
5
6
export default function LinearProgressWithLabel ( ) {
6
7
const [ progress , setProgress ] = React . useState ( 0 ) ;
@@ -16,28 +17,35 @@ export default function LinearProgressWithLabel() {
16
17
} , [ ] ) ;
17
18
18
19
return (
19
- < LinearProgress
20
- determinate
21
- variant = "outlined"
22
- color = "neutral"
23
- size = "sm"
24
- thickness = { 32 }
25
- value = { progress }
20
+ < Box
26
21
sx = { {
27
- '--LinearProgress-radius' : '0px' ,
28
- '--LinearProgress-progressThickness' : '24px' ,
29
- boxShadow : 'sm' ,
30
- borderColor : 'neutral.500' ,
22
+ bgcolor : 'white' ,
23
+ width : '100%' ,
31
24
} }
32
25
>
33
- < Typography
34
- level = "body-xs"
35
- fontWeight = "xl"
36
- textColor = "common.white"
37
- sx = { { mixBlendMode : 'difference' } }
26
+ < LinearProgress
27
+ determinate
28
+ variant = "outlined"
29
+ color = "neutral"
30
+ size = "sm"
31
+ thickness = { 32 }
32
+ value = { progress }
33
+ sx = { {
34
+ '--LinearProgress-radius' : '0px' ,
35
+ '--LinearProgress-progressThickness' : '24px' ,
36
+ boxShadow : 'sm' ,
37
+ borderColor : 'neutral.500' ,
38
+ } }
38
39
>
39
- LOADING… { `${ Math . round ( progress ) } %` }
40
- </ Typography >
41
- </ LinearProgress >
40
+ < Typography
41
+ level = "body-xs"
42
+ fontWeight = "xl"
43
+ textColor = "common.white"
44
+ sx = { { mixBlendMode : 'difference' } }
45
+ >
46
+ LOADING… { `${ Math . round ( progress ) } %` }
47
+ </ Typography >
48
+ </ LinearProgress >
49
+ </ Box >
42
50
) ;
43
51
}
You can’t perform that action at this time.
0 commit comments