@thecb/components 10.4.6-beta.6 → 10.4.7-beta.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/src/.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
- }) => {
17
- const themeContext = useContext(ThemeContext);
18
- const { isMobile } = themeContext;
19
-
20
- return (
21
- <Fragment>
22
- <Module spacingBottom={isMobile ? "0" : "1.5rem"}>
23
- <Box
24
- padding="24px"
25
- spacingBottom="0"
26
- margin="0 0 0 0"
27
- extraStyles={
28
- isMobile
29
- ? `box-shadow: 0px 1px 2px 0px #292A331A; box-shadow: 0px 2px 6px 0px #292A3333; box-shadow: 0px 1px 0px 0px #292A331A inset;
30
- ; display: flex; flex-direction: column; flex-wrap: wrap;
31
- 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"
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,20 +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 McGee", "props")}
10
- action={() => window.alert("action fired!")}
11
- />
12
- );
13
- };
14
-
15
- const story = page({
16
- title: "Components|Atoms/WalletName",
17
- component: WalletName
18
- });
19
-
20
- export default story;
@@ -1,9 +0,0 @@
1
- import { WHITE } from "../../../constants/colors";
2
-
3
- const backgroundColor = {
4
- primary: WHITE
5
- };
6
-
7
- export const fallbackValues = {
8
- backgroundColor
9
- };
@@ -1,3 +0,0 @@
1
- import WalletName from "./WalletName";
2
-
3
- export default WalletName;