File tree Expand file tree Collapse file tree 1 file changed +41
-20
lines changed
image-finder-app/src/Components Expand file tree Collapse file tree 1 file changed +41
-20
lines changed Original file line number Diff line number Diff line change 1
- import { Snackbar , makeStyles } from '@material-ui/core' ;
1
+ import {
2
+ Snackbar ,
3
+ makeStyles
4
+ } from '@material-ui/core' ;
2
5
import MuiAlert from '@material-ui/lab/Alert' ;
3
6
4
7
5
8
const useStyle = makeStyles ( {
6
- component : {
7
- '& > *' :{
8
- color : '#fff' ,
9
- backgroundColor : '#000000'
10
- }
11
- }
9
+ component : {
10
+ '& > *' : {
11
+ color : '#fff' ,
12
+ backgroundColor : '#000000'
13
+ }
14
+ }
12
15
} )
13
16
14
- const SnackBar = ( { open, toggleSnack} ) => {
17
+ const SnackBar = ( {
18
+ open,
19
+ toggleSnack
20
+ } ) => {
15
21
16
- const handleClose = ( ) => {
17
- toggleSnack ( false )
18
- } ;
19
-
20
- const classes = useStyle ( ) ;
22
+ const handleClose = ( ) => {
23
+ toggleSnack ( false )
24
+ } ;
21
25
22
- return (
23
- < Snackbar open = { open } autoHideDuration = { 3000 } onClose = { handleClose } className = { classes . component } >
24
- < MuiAlert severity = "info" onClose = { handleClose } >
25
- Number of Images should be between 3 and 200
26
- </ MuiAlert >
27
- </ Snackbar >
28
- )
26
+ const classes = useStyle ( ) ;
27
+
28
+ return (
29
+ < Snackbar open = {
30
+ open
31
+ }
32
+ autoHideDuration = {
33
+ 3000
34
+ }
35
+ onClose = {
36
+ handleClose
37
+ }
38
+ className = {
39
+ classes . component
40
+ } >
41
+ <
42
+ MuiAlert severity = "info"
43
+ onClose = {
44
+ handleClose
45
+ } >
46
+ Number of Images should be between 3 and 200
47
+ </ MuiAlert >
48
+ </ Snackbar >
49
+ )
29
50
}
30
51
31
52
export default SnackBar ;
You can’t perform that action at this time.
0 commit comments