-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (30 loc) · 764 Bytes
/
index.js
File metadata and controls
34 lines (30 loc) · 764 Bytes
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
// 1) Don't mix longhand and shorthand properties
// 2) content: '"..."' - double quotes needed
import React from 'react';
import { createComponent } from 'cf-style-container';
import { box, loading } from './styles.css';
const Box = createComponent(() => ({
border: '5px solid black',
borderColor: 'blue'
}));
const Button = createComponent(
() => ({
color: 'white',
backgroundColor: 'white',
'::before': {
content: '"…"',
color: 'black',
display: 'block',
position: 'absolute'
}
}),
'button'
);
export default () =>
<article>
<h1>9. Gotchas</h1>
<div className={box}>Some box</div>
<Box>Some box</Box>
<button className={loading}>Button</button>
<Button>Button</Button>
</article>;