@symbo.ls/button 1.1.0 → 1.1.3
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 +17 -22
- package/package.json +3 -5
- package/packages/react/index.js +0 -12
- package/packages/react/package.json +0 -12
package/index.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { Shape } from '@symbo.ls/shape'
|
|
4
3
|
import { IconText } from '@symbo.ls/icon-text'
|
|
5
|
-
import { Block } from '@symbo.ls/block'
|
|
6
|
-
import { Direction } from '@symbo.ls/direction'
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
const css = {
|
|
6
|
+
appearance: 'none',
|
|
7
|
+
border: 'none',
|
|
8
|
+
outline: 0,
|
|
9
|
+
cursor: 'pointer',
|
|
10
|
+
fontFamily: 'inherit'
|
|
11
|
+
}
|
|
9
12
|
|
|
10
13
|
export const Button = {
|
|
11
14
|
extends: IconText,
|
|
12
15
|
tag: 'button',
|
|
13
|
-
style,
|
|
14
16
|
props: {
|
|
15
|
-
type: 'button'
|
|
17
|
+
type: 'button',
|
|
18
|
+
display: 'inline-flex',
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
textDecoration: 'none',
|
|
22
|
+
css
|
|
16
23
|
},
|
|
17
24
|
attr: {
|
|
18
25
|
type: ({ props }) => props.type
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
on: {
|
|
22
|
-
click: (event, { key, value, props }) => {
|
|
23
|
-
props.onClick && props.onClick(event)
|
|
24
|
-
}
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -32,13 +33,9 @@ export const SquareButton = {
|
|
|
32
33
|
width: 'A',
|
|
33
34
|
padding: 'Z',
|
|
34
35
|
aspectRatio: '1 / 1',
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
squareButton: {
|
|
39
|
-
justifyContent: 'center',
|
|
40
|
-
boxSizing: 'content-box'
|
|
41
|
-
}
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
round: 'Z',
|
|
38
|
+
css: { boxSizing: 'content-box' }
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
41
|
|
|
@@ -49,10 +46,8 @@ export const CircleButton = {
|
|
|
49
46
|
|
|
50
47
|
export const KangorooButton = {
|
|
51
48
|
tag: 'button',
|
|
52
|
-
|
|
49
|
+
props: { css },
|
|
53
50
|
|
|
54
51
|
iconText: { extends: IconText },
|
|
55
52
|
child: { extends: IconText }
|
|
56
53
|
}
|
|
57
|
-
|
|
58
|
-
export default Button
|
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/button",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "455d3ae68d10da97cc04e538844f668d0df790cc",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@symbo.ls/block": "latest",
|
|
9
8
|
"@symbo.ls/direction": "latest",
|
|
10
|
-
"@symbo.ls/icon-text": "latest"
|
|
11
|
-
"@symbo.ls/shape": "latest"
|
|
9
|
+
"@symbo.ls/icon-text": "latest"
|
|
12
10
|
},
|
|
13
11
|
"source": "src/index.js"
|
|
14
12
|
}
|
package/packages/react/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { DOMQLReact } from '@symbo.ls/transform-react'
|
|
4
|
-
import { Button as ButtonCopy, SquareButton as SquareButtonCopy } from '@symbo.ls/button'
|
|
5
|
-
|
|
6
|
-
export const Button = (props, state) => {
|
|
7
|
-
return DOMQLReact(ButtonCopy, props, state)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const SquareButton = (props, state) => {
|
|
11
|
-
return DOMQLReact(SquareButtonCopy, props, state)
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@symbo.ls/react-button",
|
|
3
|
-
"version": "1.1.0",
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"gitHead": "f70e3ed520d8f5419235b2ad355ed579e4df3435",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@symbo.ls/button": "latest",
|
|
9
|
-
"@symbo.ls/transform-react": "latest"
|
|
10
|
-
},
|
|
11
|
-
"source": "src/index.js"
|
|
12
|
-
}
|