@thecb/components 10.4.6-beta.7 → 10.4.7-beta.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/dist/index.cjs.js +217 -298
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +218 -298
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/index.js +0 -1
- package/src/components/atoms/toggle-switch/ToggleSwitch.js +34 -61
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +2 -3
- package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +5 -5
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/icons/.DS_Store +0 -0
- package/src/components/atoms/wallet-name/WalletName.js +0 -74
- package/src/components/atoms/wallet-name/WalletName.stories.js +0 -22
- package/src/components/atoms/wallet-name/WalletName.theme.js +0 -15
- package/src/components/atoms/wallet-name/index.d.ts +0 -12
- package/src/components/atoms/wallet-name/index.js +0 -3
package/src/.DS_Store
DELETED
|
Binary file
|
package/src/components/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React, { Fragment, useContext } from "react";
|
|
2
|
-
import { Box } from "../layouts";
|
|
3
|
-
import { themeComponent } from "../../../util/themeUtils";
|
|
4
|
-
import ButtonWithAction from "../button-with-action";
|
|
5
|
-
import { noop } from "../../../util/general";
|
|
6
|
-
import Text from "../text/Text";
|
|
7
|
-
import { ThemeContext } from "styled-components";
|
|
8
|
-
import { fallbackValues } from "./WalletName.theme";
|
|
9
|
-
import Module from "../../molecules/module/Module";
|
|
10
|
-
|
|
11
|
-
const WalletName = ({
|
|
12
|
-
personName,
|
|
13
|
-
action = noop,
|
|
14
|
-
text = "Not you?",
|
|
15
|
-
actionText = "Check out as a guest",
|
|
16
|
-
themeValues
|
|
17
|
-
}) => {
|
|
18
|
-
const themeContext = useContext(ThemeContext);
|
|
19
|
-
const { isMobile } = themeContext;
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<Fragment>
|
|
23
|
-
<Module spacingBottom={isMobile ? "0" : "1.5rem"}>
|
|
24
|
-
<Box
|
|
25
|
-
padding="24px"
|
|
26
|
-
boxShadow={themeValues.boxShadow}
|
|
27
|
-
spacingBottom="0"
|
|
28
|
-
margin="0 0 0 0"
|
|
29
|
-
extraStyles={
|
|
30
|
-
isMobile
|
|
31
|
-
? `display: flex; flex-direction: column; flex-wrap: wrap; span {text - align: right;}`
|
|
32
|
-
: `display: flex; justify-content: space-between; align-items: center;`
|
|
33
|
-
}
|
|
34
|
-
>
|
|
35
|
-
<Box padding="0 0 0">
|
|
36
|
-
<Text>{personName}</Text>
|
|
37
|
-
</Box>
|
|
38
|
-
{!isMobile && (
|
|
39
|
-
<Box padding="0">
|
|
40
|
-
<Text extraStyles="font-size: 12px">{text}</Text>
|
|
41
|
-
<ButtonWithAction
|
|
42
|
-
text={actionText}
|
|
43
|
-
action={action}
|
|
44
|
-
variant="smallGhost"
|
|
45
|
-
extraStyles="span {font-size: 12px;}"
|
|
46
|
-
/>
|
|
47
|
-
</Box>
|
|
48
|
-
)}
|
|
49
|
-
</Box>
|
|
50
|
-
</Module>
|
|
51
|
-
{isMobile && (
|
|
52
|
-
<Box
|
|
53
|
-
padding="0 0 24px"
|
|
54
|
-
extraStyles="display: flex; align-items: center; justify-content: flex-end;"
|
|
55
|
-
>
|
|
56
|
-
<Text extraStyles="font-size: 12px">{text}</Text>
|
|
57
|
-
<ButtonWithAction
|
|
58
|
-
text={actionText}
|
|
59
|
-
action={action}
|
|
60
|
-
variant="smallGhost"
|
|
61
|
-
extraStyles="span {font-size: 12px;}"
|
|
62
|
-
/>
|
|
63
|
-
</Box>
|
|
64
|
-
)}
|
|
65
|
-
</Fragment>
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export default themeComponent(
|
|
70
|
-
WalletName,
|
|
71
|
-
"WalletName",
|
|
72
|
-
fallbackValues,
|
|
73
|
-
"primary"
|
|
74
|
-
);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import WalletName from "./WalletName";
|
|
3
|
-
import { text } from "@storybook/addon-knobs";
|
|
4
|
-
import page from "../../../../.storybook/page";
|
|
5
|
-
|
|
6
|
-
export const walletName = () => {
|
|
7
|
-
return (
|
|
8
|
-
<WalletName
|
|
9
|
-
personName={text("personName", "Storybook Mobile McGee", "props")}
|
|
10
|
-
action={() => window.alert("action fired!")}
|
|
11
|
-
actionText={text("actionText", "Check out as a guest", "props")}
|
|
12
|
-
text={text("text", "Not you?", "props")}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const story = page({
|
|
18
|
-
title: "Components|Atoms/WalletName",
|
|
19
|
-
component: WalletName
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export default story;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { WHITE } from "../../../constants/colors";
|
|
2
|
-
|
|
3
|
-
const backgroundColor = {
|
|
4
|
-
primary: WHITE
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
const boxShadow = {
|
|
8
|
-
primary: `box-shadow: 0px 1px 2px 0px #292A331A;
|
|
9
|
-
box-shadow: 0px 2px 6px 0px #292a3333; box-shadow: 0px 1px 0px 0px #292A331A inset;`
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const fallbackValues = {
|
|
13
|
-
backgroundColor,
|
|
14
|
-
boxShadow
|
|
15
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Expand from "../../../util/expand";
|
|
3
|
-
|
|
4
|
-
export interface WalletNameProps {
|
|
5
|
-
action?: React.SyntheticEvent;
|
|
6
|
-
text?: string;
|
|
7
|
-
actionText?: string;
|
|
8
|
-
personName: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const WalletName: React.FC<Expand<WalletNameProps> &
|
|
12
|
-
React.HTMLAttributes<HTMLElement>>;
|