-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathApp.jsx
More file actions
44 lines (34 loc) · 802 Bytes
/
App.jsx
File metadata and controls
44 lines (34 loc) · 802 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
35
36
37
38
39
40
41
42
43
44
import React from 'react'
import type {styledType} from '../types'
export default (styled: styledType) => {
const App = styled('div', {
margin: 50,
})
const Header = styled('header', {
padding: 10,
})
const Section = styled('section', {
color: 'red',
})
const AnotherSection = styled(Section, {
color: 'yellow',
})
const Title = styled('h1', {
color: 'red',
})
const Button = styled('button', {
margin: ({margin = 0}) => margin,
})
return () => (
<App>
<Header>
<Title>Title</Title>
</Header>
<Section data-name="content">
<Button>primitive test</Button>
<Button margin={10}>dynamic primitive test</Button>
</Section>
<AnotherSection>Another section</AnotherSection>
</App>
)
}