@symbo.ls/button 1.1.5 → 1.2.0
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/index.js +16 -21
- package/package.json +4 -4
- package/style.js +0 -13
package/index.js
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const css = {
|
|
6
|
-
appearance: 'none',
|
|
7
|
-
border: 'none',
|
|
8
|
-
outline: 0,
|
|
9
|
-
cursor: 'pointer',
|
|
10
|
-
fontFamily: 'inherit'
|
|
11
|
-
}
|
|
3
|
+
import { FocusableComponent } from '@symbo.ls/atoms'
|
|
4
|
+
import { IconText } from '@symbo.ls/icon'
|
|
12
5
|
|
|
13
6
|
export const Button = {
|
|
14
|
-
|
|
7
|
+
extend: [FocusableComponent, IconText],
|
|
15
8
|
tag: 'button',
|
|
16
9
|
props: {
|
|
10
|
+
fontSize: 'A',
|
|
17
11
|
type: 'button',
|
|
12
|
+
border: 'none',
|
|
18
13
|
display: 'inline-flex',
|
|
19
|
-
|
|
20
|
-
justifyContent: 'center',
|
|
14
|
+
align: 'center center',
|
|
21
15
|
textDecoration: 'none',
|
|
22
|
-
|
|
16
|
+
lineHeight: '1',
|
|
17
|
+
whiteSpace: 'nowrap',
|
|
18
|
+
padding: 'Z A1',
|
|
19
|
+
fontFamily: 'inherit',
|
|
20
|
+
round: 'C2'
|
|
23
21
|
},
|
|
24
22
|
attr: {
|
|
25
23
|
type: ({ props }) => props.type
|
|
@@ -27,7 +25,7 @@ export const Button = {
|
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
export const SquareButton = {
|
|
30
|
-
|
|
28
|
+
extend: Button,
|
|
31
29
|
props: {
|
|
32
30
|
fontSize: 'A',
|
|
33
31
|
width: 'A',
|
|
@@ -35,19 +33,16 @@ export const SquareButton = {
|
|
|
35
33
|
aspectRatio: '1 / 1',
|
|
36
34
|
justifyContent: 'center',
|
|
37
35
|
round: 'Z',
|
|
38
|
-
|
|
36
|
+
style: { boxSizing: 'content-box' }
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
export const CircleButton = {
|
|
43
|
-
|
|
41
|
+
extend: SquareButton,
|
|
44
42
|
props: { round: 'C' }
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
export const KangorooButton = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
iconText: { extends: IconText },
|
|
52
|
-
child: { extends: IconText }
|
|
46
|
+
extend: Button,
|
|
47
|
+
childExtend: IconText
|
|
53
48
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/button",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "769d39aee2ab66f0d64b1e0052893442857e7432",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@symbo.ls/
|
|
9
|
-
"@symbo.ls/icon
|
|
8
|
+
"@symbo.ls/atoms": "latest",
|
|
9
|
+
"@symbo.ls/icon": "latest"
|
|
10
10
|
},
|
|
11
11
|
"source": "src/index.js"
|
|
12
12
|
}
|
package/style.js
DELETED