@symbo.ls/button 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/package.json +7 -0
- package/packages/react/index.js +1 -0
- package/packages/react/package.json +7 -0
- package/src/index.js +55 -0
- package/src/style.js +13 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict'
|
package/src/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Shape, Block, IconText, Direction } from '../'
|
|
4
|
+
|
|
5
|
+
import style from './style'
|
|
6
|
+
|
|
7
|
+
export const Button = {
|
|
8
|
+
proto: [Shape, Block, IconText, Direction],
|
|
9
|
+
tag: 'button',
|
|
10
|
+
style,
|
|
11
|
+
props: {
|
|
12
|
+
type: 'button'
|
|
13
|
+
},
|
|
14
|
+
attr: {
|
|
15
|
+
type: ({ props }) => props.type
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const SquareButton = {
|
|
20
|
+
proto: Button,
|
|
21
|
+
props: {
|
|
22
|
+
size: 'A',
|
|
23
|
+
width: 'A',
|
|
24
|
+
padding: 'Z',
|
|
25
|
+
aspectRatio: '1 / 1',
|
|
26
|
+
round: 'Z'
|
|
27
|
+
},
|
|
28
|
+
class: {
|
|
29
|
+
squareButton: {
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
boxSizing: 'content-box'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const CircleButton = {
|
|
37
|
+
proto: SquareButton,
|
|
38
|
+
props: { round: 'C' }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const KangorooButton = {
|
|
42
|
+
tag: 'button',
|
|
43
|
+
proto: [Shape, Direction, Block],
|
|
44
|
+
style,
|
|
45
|
+
|
|
46
|
+
iconText: {
|
|
47
|
+
proto: IconText
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
child: {
|
|
51
|
+
proto: [Shape, Block, IconText]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default Button
|
package/src/style.js
ADDED