-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
56 lines (47 loc) · 1.16 KB
/
App.js
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
/** @jsxImportSource @emotion/react */
import { css } from '@emotion/react'
import { renderBreakpoints, renderVerticalBreakpoints } from '@open-sorcerers/breakpoints'
import { asRem, makePainter, HORIZONTAL_BREAKPOINTS, VERTICAL_BREAKPOINTS } from 'bodypaint'
import logo from './logo.svg';
export const POINTS = asRem(16, HORIZONTAL_BREAKPOINTS)
export const VPOINTS = asRem(16, VERTICAL_BREAKPOINTS)
console.log("POINTS", POINTS, "VERTICAL POINTS", VPOINTS)
export const Breakpoints = renderBreakpoints(POINTS)
export const VBreakpoints = renderVerticalBreakpoints(VPOINTS)
const mq = makePainter({
useMin: true,
useHeight: false,
baseFontSize: 16,
implicit: true,
points: {
ONE: 320,
TWO: 480,
THREE: 640,
FOUR: 800
}
})
const responsiveBoxStyle = mq({
background: {
ONE: 'red',
TWO: 'orange',
THREE: 'yellow',
FOUR: 'green'
}
})
const boxStyle = css`
width: 5rem;
height: 5rem;
border: 10px solid black;
display: flex;
margin: auto;
${responsiveBoxStyle}
`
console.log("BOXSTYLE", boxStyle)
const App = () => (
<>
<Breakpoints />
<VBreakpoints />
<div css={boxStyle} />
</>
)
export default App;