jbx 1.7.0 → 1.7.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/index.js +12 -13
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
2
|
|
|
3
3
|
import Styled from 'styled-components';
|
|
4
4
|
import capsize from 'capsize';
|
|
5
5
|
|
|
6
6
|
import { createGlobalStyle } from 'styled-components';
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const SIZE = window.innerHeight > 640 ? 16 : 13;
|
|
9
|
+
const BASE_SIZE = SIZE;
|
|
10
10
|
const BASE_RADIUS = SIZE / 2;
|
|
11
11
|
const SPACE = SIZE;
|
|
12
12
|
const BASE_FONT_SIZE = SIZE;
|
|
@@ -43,7 +43,6 @@ export const JBX = createGlobalStyle`
|
|
|
43
43
|
input,
|
|
44
44
|
textarea {
|
|
45
45
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
|
|
46
|
-
font-size: 16px;
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
body {
|
|
@@ -106,7 +105,7 @@ export const ButtonContainer = Styled.button({
|
|
|
106
105
|
|
|
107
106
|
export const Button = function Button(props) {
|
|
108
107
|
const { children, ...other } = props;
|
|
109
|
-
return createElement(ButtonContainer, other, createElement(Text, {}, children));
|
|
108
|
+
return React.createElement(ButtonContainer, other, React.createElement(Text, {}, children));
|
|
110
109
|
};
|
|
111
110
|
|
|
112
111
|
export const Input = Styled.input({
|
|
@@ -203,11 +202,11 @@ export const HeaderH1 = Styled.h1({
|
|
|
203
202
|
export const MainHeader = function MainHeader({ children }) {
|
|
204
203
|
const content = String(children).split(' ');
|
|
205
204
|
|
|
206
|
-
return createElement(
|
|
205
|
+
return React.createElement(
|
|
207
206
|
Fragment,
|
|
208
207
|
{},
|
|
209
208
|
content.map((word) =>
|
|
210
|
-
createElement(
|
|
209
|
+
React.createElement(
|
|
211
210
|
HeaderH1,
|
|
212
211
|
{
|
|
213
212
|
key: word,
|
|
@@ -374,7 +373,7 @@ export const CheckboxHidden = Styled.div(({ checked }) => {
|
|
|
374
373
|
});
|
|
375
374
|
|
|
376
375
|
export const Checkbox = function Checkbox({ label, checked, onChange }) {
|
|
377
|
-
return createElement(
|
|
376
|
+
return React.createElement(
|
|
378
377
|
Inline,
|
|
379
378
|
{
|
|
380
379
|
onClick: () => {
|
|
@@ -388,13 +387,13 @@ export const Checkbox = function Checkbox({ label, checked, onChange }) {
|
|
|
388
387
|
}
|
|
389
388
|
},
|
|
390
389
|
[
|
|
391
|
-
createElement(
|
|
390
|
+
React.createElement(
|
|
392
391
|
CheckboxHidden,
|
|
393
392
|
{
|
|
394
393
|
key: 0,
|
|
395
394
|
checked
|
|
396
395
|
},
|
|
397
|
-
createElement(
|
|
396
|
+
React.createElement(
|
|
398
397
|
'svg',
|
|
399
398
|
{
|
|
400
399
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
@@ -409,13 +408,13 @@ export const Checkbox = function Checkbox({ label, checked, onChange }) {
|
|
|
409
408
|
viewBox: '0 0 24 24',
|
|
410
409
|
color: checked ? 'white' : '#ddd'
|
|
411
410
|
},
|
|
412
|
-
createElement('path', {
|
|
411
|
+
React.createElement('path', {
|
|
413
412
|
d: 'M20 6L9 17 4 12'
|
|
414
413
|
})
|
|
415
414
|
)
|
|
416
415
|
),
|
|
417
|
-
createElement(Space, { key: 1, w: 0.5 }),
|
|
418
|
-
createElement(Text, { key: 2, style: { userSelect: 'none' } }, label)
|
|
416
|
+
React.createElement(Space, { key: 1, w: 0.5 }),
|
|
417
|
+
React.createElement(Text, { key: 2, style: { userSelect: 'none' } }, label)
|
|
419
418
|
]
|
|
420
419
|
);
|
|
421
420
|
};
|