/
App.tsx
87 lines (81 loc) · 2.82 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import React from 'react'
import logo from './logo.svg'
import { Grid, useMediaQuery, useTheme } from '@material-ui/core'
import {
CreateBeerForm,
CreateBeerFormikForm,
DogDetails,
Spacer
} from './Components'
import { Notification } from './Common/Notification/Notification'
import { useClasses } from './App.style'
import './App.css'
import { DogBreedListContainer } from './Containers'
const emitAlert = () => Notification.alert('Howdy, stranger.')
const doBark = () => Notification.alert('Woof! Woof!')
function App() {
const theme = useTheme()
const isMdOrLower = useMediaQuery(theme.breakpoints.down('md'))
const styles = useClasses(isMdOrLower)
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<button data-testid="app__emit-alert" onClick={emitAlert}>
Emit Alert
</button>
<Spacer />
<div className={styles.gridContainer}>
<Grid container spacing={3}>
<Grid
className={styles.left}
item
xs={12}
md={12}
lg={6}
>
<DogBreedListContainer />
</Grid>
<Grid
className={styles.right}
item
xs={12}
md={12}
lg={6}
>
<DogDetails
testId="app__dog-details"
title="Dog"
imageURL="https://via.placeholder.com/200x200?text=Dog%20Image"
onBark={doBark}
/>
</Grid>
<Grid
className={styles.left}
item
xs={12}
md={12}
lg={6}
>
<CreateBeerForm />
</Grid>
<Grid
className={styles.right}
item
xs={12}
md={12}
lg={6}
>
<CreateBeerFormikForm />
</Grid>
</Grid>
</div>
<Spacer height={3} />
</header>
</div>
)
}
export default App
export const testables = {
doBark
}