@sikka/hawa 0.0.2 → 0.0.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/.github/workflows/hawa-publish.yml +43 -0
- package/.prettierrc +28 -28
- package/README.md +149 -148
- package/package.json +49 -47
- package/rollup.config.js +30 -30
- package/src/blocks/Account/UserProfile.js +15 -0
- package/src/blocks/Account/UserSettings.js +15 -0
- package/src/blocks/Account/index.js +2 -0
- package/src/blocks/AuthForms/NewPasswordForm.js +17 -0
- package/src/blocks/AuthForms/ResetPasswordForm.js +14 -0
- package/src/blocks/AuthForms/SignInForm.js +19 -0
- package/src/{components/Hawa → blocks}/AuthForms/SignUpForm.js +20 -26
- package/src/{components/Hawa → blocks}/AuthForms/index.js +4 -4
- package/src/{components/Hawa → blocks}/AuthForms/viaFacebook.js +0 -0
- package/src/{components/Hawa → blocks}/AuthForms/viaGithub.js +0 -0
- package/src/{components/Hawa → blocks}/AuthForms/viaGoogle.js +0 -0
- package/src/{components/Hawa → blocks}/AuthForms/viaTwitter.js +0 -0
- package/src/index.js +1 -1
- package/src/layout/Box.js +25 -0
- package/src/layout/index.js +1 -0
- package/src/stories/ActionButton.stories.js +49 -0
- package/src/stories/AdaptiveButton.stories.js +80 -80
- package/src/stories/Alert.stories.js +41 -48
- package/src/stories/AuthForm.stories.js +79 -76
- package/src/stories/Box.stories.js +64 -45
- package/src/stories/CheckBox.stories.js +35 -34
- package/src/stories/GlobalVariables.stories.js +101 -108
- package/src/stories/HawaProvider.stories.js +23 -23
- package/src/stories/InputLabel.stories.js +92 -100
- package/src/stories/Introduction.stories.js +211 -0
- package/src/stories/RadioSelector.stories.js +69 -69
- package/src/stories/TextField.stories.js +50 -50
- package/src/stories/UserAccount.stories.js +46 -0
- package/src/styles.css +400 -400
- package/src/themes/HawaProvider.js +45 -0
- package/src/ui/ActionButton.js +15 -0
- package/src/{components/Hawa/AdaptiveButton → ui}/AdaptiveButton.js +252 -254
- package/src/{components/Hawa/AutoCompleteField/AutoCompleteField.jsx → ui/AutoCompleteField.js} +33 -33
- package/src/{components/Hawa/Checkbox/Checkbox.jsx → ui/Checkbox.js} +21 -20
- package/src/{components/Hawa/DragDropImages/DragDropImages.jsx → ui/DragDropImages.js} +180 -180
- package/src/{components/Hawa/Hawa.jsx → ui/Hawa.js} +3 -3
- package/src/{components/Hawa/RadioBox/RadioBox.jsx → ui/RadioBox.js} +29 -29
- package/src/{components/Hawa/RadioSelector/RadioSelector.jsx → ui/RadioSelector.js} +51 -51
- package/src/{components/Hawa/Row/Row.jsx → ui/Row.js} +21 -21
- package/src/{components/Hawa/SelectedField/SelectedField.jsx → ui/SelectedField.js} +46 -46
- package/src/ui/StyledAlert.js +30 -0
- package/src/ui/StyledInputLabel.js +19 -0
- package/src/{components/Hawa/StyledTooltip → ui}/StyledTooltip.js +46 -46
- package/src/{components/Hawa/TabPanel/TabPanel.jsx → ui/TabPanel.js} +37 -37
- package/src/{components/Hawa/TextArea/TextArea.jsx → ui/TextArea.js} +38 -38
- package/src/{components/Hawa/TextField → ui}/TextField.js +62 -54
- package/src/{components/Hawa → ui}/index.js +13 -10
- package/src/util.js +20 -20
- package/storybook-static/0.d3bc3395610cf5d3ee94.manager.bundle.js +1 -0
- package/storybook-static/0.dd3d47f5.iframe.bundle.js +1 -0
- package/storybook-static/1.4e43f671.iframe.bundle.js +3 -0
- package/storybook-static/{1.7c0dc86d.iframe.bundle.js.LICENSE.txt → 1.4e43f671.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/1.4e43f671.iframe.bundle.js.map +1 -0
- package/storybook-static/2.9a757207.iframe.bundle.js +1 -0
- package/storybook-static/{3.592ce28f.iframe.bundle.js → 3.c1dc7159.iframe.bundle.js} +0 -0
- package/storybook-static/4.8c311a6b48cad9f29317.manager.bundle.js +2 -0
- package/storybook-static/{5.f459d151315e6780c20f.manager.bundle.js.LICENSE.txt → 4.8c311a6b48cad9f29317.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/5.88fe62ee92ff5ca67829.manager.bundle.js +1 -0
- package/storybook-static/6.96d184f368dea006cb52.manager.bundle.js +2 -0
- package/storybook-static/{11.f4e922583ae35da460f3.manager.bundle.js.LICENSE.txt → 6.96d184f368dea006cb52.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/{7.3d04765dbf3f1dcd706c.manager.bundle.js → 7.5ec31f3702b08ab0b71c.manager.bundle.js} +1 -1
- package/storybook-static/7.69d2e532.iframe.bundle.js +1 -0
- package/storybook-static/8.5ce13be7612bd3a6b864.manager.bundle.js +1 -0
- package/storybook-static/{8.8e2132ec.iframe.bundle.js → 8.68cd1217.iframe.bundle.js} +2 -2
- package/storybook-static/{8.8e2132ec.iframe.bundle.js.LICENSE.txt → 8.68cd1217.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/8.68cd1217.iframe.bundle.js.map +1 -0
- package/storybook-static/{9.109ea555.iframe.bundle.js → 9.488e3969.iframe.bundle.js} +0 -0
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/index.html +9 -1
- package/storybook-static/main.65cb2769.iframe.bundle.js +1 -0
- package/storybook-static/main.7e391cf7bf72b0d18ea5.manager.bundle.js +1 -0
- package/storybook-static/{runtime~main.ffc8677e.iframe.bundle.js → runtime~main.6e2e1544.iframe.bundle.js} +1 -1
- package/storybook-static/runtime~main.cc29f4c2175f187a3707.manager.bundle.js +1 -0
- package/storybook-static/vendors~main.d144d840.iframe.bundle.js +3 -0
- package/storybook-static/{vendors~main.4aa936b1.iframe.bundle.js.LICENSE.txt → vendors~main.d144d840.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.d144d840.iframe.bundle.js.map +1 -0
- package/storybook-static/vendors~main.f228d62e92b69563cefb.manager.bundle.js +2 -0
- package/storybook-static/{vendors~main.a935f15a2179a6eff5fd.manager.bundle.js.LICENSE.txt → vendors~main.f228d62e92b69563cefb.manager.bundle.js.LICENSE.txt} +6 -12
- package/yarn-error.log +10910 -0
- package/dist/index.es.js +0 -37
- package/dist/index.js +0 -37
- package/src/components/Hawa/AdaptiveButton/index.js +0 -1
- package/src/components/Hawa/AuthForms/NewPasswordForm.js +0 -23
- package/src/components/Hawa/AuthForms/ResetPasswordForm.js +0 -21
- package/src/components/Hawa/AuthForms/SignInForm.js +0 -25
- package/src/components/Hawa/AutoCompleteField/index.js +0 -1
- package/src/components/Hawa/Box/Box.js +0 -18
- package/src/components/Hawa/Box/index.js +0 -1
- package/src/components/Hawa/Checkbox/index.js +0 -1
- package/src/components/Hawa/DragDropImages/index.js +0 -1
- package/src/components/Hawa/HawaProvider/HawaProvider.js +0 -19
- package/src/components/Hawa/HawaProvider/index.js +0 -1
- package/src/components/Hawa/InputLabel/StyledInputLabel.js +0 -15
- package/src/components/Hawa/InputLabel/index.js +0 -1
- package/src/components/Hawa/RadioBox/index.js +0 -1
- package/src/components/Hawa/RadioSelector/index.js +0 -1
- package/src/components/Hawa/Row/index.js +0 -1
- package/src/components/Hawa/SelectedField/index.js +0 -1
- package/src/components/Hawa/StyledAlert/StyledAlert.js +0 -15
- package/src/components/Hawa/StyledAlert/index.js +0 -1
- package/src/components/Hawa/StyledTooltip/index.js +0 -1
- package/src/components/Hawa/TabPanel/index.js +0 -1
- package/src/components/Hawa/TextArea/index.js +0 -1
- package/src/components/Hawa/TextField/index.js +0 -1
- package/storybook-static/0.12392f0b.iframe.bundle.js +0 -1
- package/storybook-static/0.55b012452099ace2dca6.manager.bundle.js +0 -1
- package/storybook-static/1.0f38715c61c7c3cd11db.manager.bundle.js +0 -1
- package/storybook-static/1.7c0dc86d.iframe.bundle.js +0 -3
- package/storybook-static/1.7c0dc86d.iframe.bundle.js.map +0 -1
- package/storybook-static/10.9f2923a7561bc20fffdb.manager.bundle.js +0 -1
- package/storybook-static/11.f4e922583ae35da460f3.manager.bundle.js +0 -2
- package/storybook-static/12.1415460941f0bdcb8fa8.manager.bundle.js +0 -1
- package/storybook-static/2.ee357266.iframe.bundle.js +0 -1
- package/storybook-static/5.f459d151315e6780c20f.manager.bundle.js +0 -2
- package/storybook-static/6.3bd64d820f3745f262ff.manager.bundle.js +0 -1
- package/storybook-static/7.af56919f.iframe.bundle.js +0 -1
- package/storybook-static/8.8e2132ec.iframe.bundle.js.map +0 -1
- package/storybook-static/8.b541eadfcb9164835dfc.manager.bundle.js +0 -1
- package/storybook-static/9.411ac8e451bbb10926c7.manager.bundle.js +0 -1
- package/storybook-static/main.78b7d418.iframe.bundle.js +0 -1
- package/storybook-static/main.9bb085ebb152f5b19a2a.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.9468098d21070636985f.manager.bundle.js +0 -1
- package/storybook-static/vendors~main.4aa936b1.iframe.bundle.js +0 -3
- package/storybook-static/vendors~main.4aa936b1.iframe.bundle.js.map +0 -1
- package/storybook-static/vendors~main.a935f15a2179a6eff5fd.manager.bundle.js +0 -2
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import React, { useContext } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { StyledTextField } from "
|
|
5
|
-
|
|
6
|
-
export const SignUpForm = (props) => {
|
|
7
|
-
const theme = useContext(ThemeProvider);
|
|
8
|
-
return (
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<StyledInputLabel label="Confirm Password" />
|
|
22
|
-
<StyledTextField type="text" />
|
|
23
|
-
{props.children}
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
|
+
import { Box } from "../../layout";
|
|
3
|
+
import { ThemeProvider } from "../../themes/HawaProvider";
|
|
4
|
+
import { StyledTextField, StyledInputLabel } from "../../ui";
|
|
5
|
+
|
|
6
|
+
export const SignUpForm = (props) => {
|
|
7
|
+
const theme = useContext(ThemeProvider);
|
|
8
|
+
return (
|
|
9
|
+
<Box maxWidth={400}>
|
|
10
|
+
|
|
11
|
+
<StyledInputLabel label="Email" />
|
|
12
|
+
<StyledTextField type="text" />
|
|
13
|
+
<StyledInputLabel label="Password" />
|
|
14
|
+
<StyledTextField type="text" />
|
|
15
|
+
<StyledInputLabel label="Confirm Password" />
|
|
16
|
+
<StyledTextField type="text" />
|
|
17
|
+
{props.children}
|
|
18
|
+
</Box>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./NewPasswordForm.js";
|
|
2
|
-
export * from "./ResetPasswordForm.js";
|
|
3
|
-
export * from "./SignUpForm.js";
|
|
4
|
-
export * from "./SignInForm.js";
|
|
1
|
+
export * from "./NewPasswordForm.js";
|
|
2
|
+
export * from "./ResetPasswordForm.js";
|
|
3
|
+
export * from "./SignUpForm.js";
|
|
4
|
+
export * from "./SignInForm.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./components/Hawa";
|
|
1
|
+
export * from "./components/Hawa";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
|
+
import { ThemeProvider } from "../themes/HawaProvider";
|
|
3
|
+
|
|
4
|
+
export const Box = (props) => {
|
|
5
|
+
const theme = useContext(ThemeProvider);
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
style={{
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column',
|
|
11
|
+
// justifyContent: 'center',
|
|
12
|
+
// alignItems: 'center',
|
|
13
|
+
|
|
14
|
+
backgroundColor: theme.layoutColor,
|
|
15
|
+
color: theme.textColor,
|
|
16
|
+
padding: theme.paddings,
|
|
17
|
+
margin: theme.margins,
|
|
18
|
+
borderRadius: theme.borderRadius,
|
|
19
|
+
maxWidth: props.maxWidth
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
{props.children}
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Box";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { defaultTheme, HawaProvider } from "../themes/HawaProvider";
|
|
4
|
+
import { ActionButton } from "../ui";
|
|
5
|
+
|
|
6
|
+
const Template = (args) => {
|
|
7
|
+
const theme = {
|
|
8
|
+
borderRadius: 10,
|
|
9
|
+
primaryColor: "green",
|
|
10
|
+
secondaryColor: "red",
|
|
11
|
+
// margins: "10px",
|
|
12
|
+
paperColors: "#c6c6c6",
|
|
13
|
+
paddings: 10,
|
|
14
|
+
margins: 10
|
|
15
|
+
};
|
|
16
|
+
return (
|
|
17
|
+
<HawaProvider theme={{ ...defaultTheme, ...args.theme }}>
|
|
18
|
+
<ActionButton secondary={args.secondary} text='here' />
|
|
19
|
+
</HawaProvider>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
//types:
|
|
23
|
+
//error (red)
|
|
24
|
+
//warning (red)
|
|
25
|
+
//notice (blue)
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
title: "UI/ActionButton",
|
|
29
|
+
component: ActionButton
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const Primary = Template.bind({});
|
|
33
|
+
Primary.args = {
|
|
34
|
+
showText: true,
|
|
35
|
+
buttonLabel: "test",
|
|
36
|
+
borderRadius: 5,
|
|
37
|
+
textColor: "#000000",
|
|
38
|
+
buttonColor: "#f9f9f9"
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Secondary = Template.bind({});
|
|
42
|
+
Secondary.args = {
|
|
43
|
+
secondary: true,
|
|
44
|
+
showText: true,
|
|
45
|
+
buttonLabel: "test",
|
|
46
|
+
borderRadius: 5,
|
|
47
|
+
textColor: "#000000",
|
|
48
|
+
buttonColor: "#f9f9f9",
|
|
49
|
+
};
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const Template = (args) => {
|
|
7
|
-
const theme = {
|
|
8
|
-
borderRadius: 10,
|
|
9
|
-
primaryColor: "#004fff",
|
|
10
|
-
secondaryColor: "red",
|
|
11
|
-
// margins: "10px",
|
|
12
|
-
paddings: 10
|
|
13
|
-
};
|
|
14
|
-
return (
|
|
15
|
-
<HawaProvider theme={theme}>
|
|
16
|
-
<AdaptiveButton {...args} />
|
|
17
|
-
</HawaProvider>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
export default {
|
|
21
|
-
title: "
|
|
22
|
-
component: AdaptiveButton,
|
|
23
|
-
argsTypes: {
|
|
24
|
-
buttonLabel: { control: "text" },
|
|
25
|
-
borderRadius: { control: "number" },
|
|
26
|
-
buttonColor: { control: "color" },
|
|
27
|
-
padding: { control: "number" },
|
|
28
|
-
hintTitle: { control: "text" },
|
|
29
|
-
hintContent: { control: "text" }
|
|
30
|
-
},
|
|
31
|
-
args: {
|
|
32
|
-
// type: "text",
|
|
33
|
-
// buttonLabel: "Test"
|
|
34
|
-
// borderRadius: 15,
|
|
35
|
-
hintTitle: "test",
|
|
36
|
-
hintContent: "more test",
|
|
37
|
-
buttonColor: "#f9f9f9"
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const Light = Template.bind({});
|
|
42
|
-
Light.args = {
|
|
43
|
-
showText: true,
|
|
44
|
-
buttonLabel: "test",
|
|
45
|
-
borderRadius: 5,
|
|
46
|
-
icon: <CastIcon />,
|
|
47
|
-
textColor: "#000000",
|
|
48
|
-
buttonColor: "#f9f9f9"
|
|
49
|
-
// placeholder: "Example ...",
|
|
50
|
-
// defaultValue: "This is default value",
|
|
51
|
-
// inputLabel: "Text Field",
|
|
52
|
-
// padding: 10
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const Dark = Template.bind({});
|
|
56
|
-
Dark.args = {
|
|
57
|
-
showText: true,
|
|
58
|
-
buttonLabel: "test",
|
|
59
|
-
borderRadius: 5,
|
|
60
|
-
buttonColor: "#878787",
|
|
61
|
-
textColor: "#ffffff",
|
|
62
|
-
icon: <CastIcon />
|
|
63
|
-
// placeholder: "Exemple ...",
|
|
64
|
-
// defaultValue: "This is default value",
|
|
65
|
-
// inputLabel: "Text Field",
|
|
66
|
-
// padding: 10
|
|
67
|
-
};
|
|
68
|
-
export const Danger = Template.bind({});
|
|
69
|
-
Danger.args = {
|
|
70
|
-
showText: true,
|
|
71
|
-
buttonLabel: "test",
|
|
72
|
-
borderRadius: 5,
|
|
73
|
-
buttonColor: "#c0c0c0",
|
|
74
|
-
danger: true,
|
|
75
|
-
icon: <CastIcon />
|
|
76
|
-
// placeholder: "Exemple ...",
|
|
77
|
-
// defaultValue: "This is default value",
|
|
78
|
-
// inputLabel: "Text Field",
|
|
79
|
-
// padding: 10
|
|
80
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import CastIcon from "@material-ui/icons/Cast";
|
|
3
|
+
import { HawaProvider } from "../themes/HawaProvider";
|
|
4
|
+
import { AdaptiveButton } from "../ui";
|
|
5
|
+
|
|
6
|
+
const Template = (args) => {
|
|
7
|
+
const theme = {
|
|
8
|
+
borderRadius: 10,
|
|
9
|
+
primaryColor: "#004fff",
|
|
10
|
+
secondaryColor: "red",
|
|
11
|
+
// margins: "10px",
|
|
12
|
+
paddings: 10
|
|
13
|
+
};
|
|
14
|
+
return (
|
|
15
|
+
<HawaProvider theme={theme}>
|
|
16
|
+
<AdaptiveButton {...args} />
|
|
17
|
+
</HawaProvider>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export default {
|
|
21
|
+
title: "UI/AdaptiveButton",
|
|
22
|
+
component: AdaptiveButton,
|
|
23
|
+
argsTypes: {
|
|
24
|
+
buttonLabel: { control: "text" },
|
|
25
|
+
borderRadius: { control: "number" },
|
|
26
|
+
buttonColor: { control: "color" },
|
|
27
|
+
padding: { control: "number" },
|
|
28
|
+
hintTitle: { control: "text" },
|
|
29
|
+
hintContent: { control: "text" }
|
|
30
|
+
},
|
|
31
|
+
args: {
|
|
32
|
+
// type: "text",
|
|
33
|
+
// buttonLabel: "Test"
|
|
34
|
+
// borderRadius: 15,
|
|
35
|
+
hintTitle: "test",
|
|
36
|
+
hintContent: "more test",
|
|
37
|
+
buttonColor: "#f9f9f9"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Light = Template.bind({});
|
|
42
|
+
Light.args = {
|
|
43
|
+
showText: true,
|
|
44
|
+
buttonLabel: "test",
|
|
45
|
+
borderRadius: 5,
|
|
46
|
+
icon: <CastIcon />,
|
|
47
|
+
textColor: "#000000",
|
|
48
|
+
buttonColor: "#f9f9f9"
|
|
49
|
+
// placeholder: "Example ...",
|
|
50
|
+
// defaultValue: "This is default value",
|
|
51
|
+
// inputLabel: "Text Field",
|
|
52
|
+
// padding: 10
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const Dark = Template.bind({});
|
|
56
|
+
Dark.args = {
|
|
57
|
+
showText: true,
|
|
58
|
+
buttonLabel: "test",
|
|
59
|
+
borderRadius: 5,
|
|
60
|
+
buttonColor: "#878787",
|
|
61
|
+
textColor: "#ffffff",
|
|
62
|
+
icon: <CastIcon />
|
|
63
|
+
// placeholder: "Exemple ...",
|
|
64
|
+
// defaultValue: "This is default value",
|
|
65
|
+
// inputLabel: "Text Field",
|
|
66
|
+
// padding: 10
|
|
67
|
+
};
|
|
68
|
+
export const Danger = Template.bind({});
|
|
69
|
+
Danger.args = {
|
|
70
|
+
showText: true,
|
|
71
|
+
buttonLabel: "test",
|
|
72
|
+
borderRadius: 5,
|
|
73
|
+
buttonColor: "#c0c0c0",
|
|
74
|
+
danger: true,
|
|
75
|
+
icon: <CastIcon />
|
|
76
|
+
// placeholder: "Exemple ...",
|
|
77
|
+
// defaultValue: "This is default value",
|
|
78
|
+
// inputLabel: "Text Field",
|
|
79
|
+
// padding: 10
|
|
80
|
+
};
|
|
@@ -1,48 +1,41 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { HawaProvider } from "../
|
|
4
|
-
import { StyledAlert } from "../
|
|
5
|
-
|
|
6
|
-
const Template = (args) => {
|
|
7
|
-
const theme = {
|
|
8
|
-
borderRadius: 10,
|
|
9
|
-
primaryColor: "green",
|
|
10
|
-
secondaryColor: "red",
|
|
11
|
-
// margins: "10px",
|
|
12
|
-
paperColors: "#c6c6c6",
|
|
13
|
-
paddings: 10,
|
|
14
|
-
margins: 10
|
|
15
|
-
};
|
|
16
|
-
return (
|
|
17
|
-
<HawaProvider theme={theme}>
|
|
18
|
-
<StyledAlert text="
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Dark.args = {
|
|
43
|
-
showText: true,
|
|
44
|
-
buttonLabel: "test",
|
|
45
|
-
borderRadius: 5,
|
|
46
|
-
buttonColor: "#878787",
|
|
47
|
-
textColor: "#ffffff"
|
|
48
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { HawaProvider } from "../themes/HawaProvider";
|
|
4
|
+
import { StyledAlert } from "../ui";
|
|
5
|
+
|
|
6
|
+
const Template = (args) => {
|
|
7
|
+
const theme = {
|
|
8
|
+
borderRadius: 10,
|
|
9
|
+
primaryColor: "green",
|
|
10
|
+
secondaryColor: "red",
|
|
11
|
+
// margins: "10px",
|
|
12
|
+
paperColors: "#c6c6c6",
|
|
13
|
+
paddings: 10,
|
|
14
|
+
margins: 10
|
|
15
|
+
};
|
|
16
|
+
return (
|
|
17
|
+
<HawaProvider theme={theme}>
|
|
18
|
+
<StyledAlert text="This is a warning" type="warning" />
|
|
19
|
+
<StyledAlert text="This is a regular notification" type="notification" />
|
|
20
|
+
<StyledAlert text="This is a danger alert" type="danger" />
|
|
21
|
+
</HawaProvider>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
//types:
|
|
25
|
+
//error (red)
|
|
26
|
+
//warning (red)
|
|
27
|
+
//notice (blue)
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
title: "UI/Alert",
|
|
31
|
+
component: StyledAlert
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const Default = Template.bind({});
|
|
35
|
+
Default.args = {
|
|
36
|
+
showText: true,
|
|
37
|
+
buttonLabel: "test",
|
|
38
|
+
borderRadius: 5,
|
|
39
|
+
textColor: "#000000",
|
|
40
|
+
buttonColor: "#f9f9f9"
|
|
41
|
+
};
|
|
@@ -1,76 +1,79 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
NewPasswordForm,
|
|
4
|
+
ResetPasswordForm,
|
|
5
|
+
SignInForm,
|
|
6
|
+
SignUpForm
|
|
7
|
+
} from "../blocks/AuthForms";
|
|
8
|
+
import { defaultTheme, HawaProvider } from "../themes/HawaProvider";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: "Blocks/AuthForms",
|
|
12
|
+
component: SignInForm,
|
|
13
|
+
argsTypes: {
|
|
14
|
+
viaGoogle: { control: "boolean" },
|
|
15
|
+
viaGithub: { control: "boolean" },
|
|
16
|
+
viaTwitter: { control: "boolean" },
|
|
17
|
+
viaFacebook: { control: "boolean" }
|
|
18
|
+
},
|
|
19
|
+
args: {}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const theme = {
|
|
23
|
+
borderRadius: 20,
|
|
24
|
+
primaryColor: "green",
|
|
25
|
+
secondaryColor: "red",
|
|
26
|
+
inputColor: "lightGrey",
|
|
27
|
+
paddings: 10,
|
|
28
|
+
paperColors: 'blue'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const SignInTemplate = (args) => {
|
|
32
|
+
return (
|
|
33
|
+
<HawaProvider theme={{ ...defaultTheme }}>
|
|
34
|
+
<SignInForm {...args} />
|
|
35
|
+
</HawaProvider>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const SignIn = SignInTemplate.bind({});
|
|
40
|
+
SignIn.args = {
|
|
41
|
+
viaGoogle: true,
|
|
42
|
+
viaGithub: true,
|
|
43
|
+
viaTwitter: true,
|
|
44
|
+
viaFacebook: true
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const SignUpTemplate = (args) => {
|
|
48
|
+
return (
|
|
49
|
+
<HawaProvider theme={{ ...defaultTheme }}>
|
|
50
|
+
<SignUpForm {...args} />
|
|
51
|
+
</HawaProvider>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
export const SignUp = SignUpTemplate.bind({});
|
|
55
|
+
SignUp.args = {
|
|
56
|
+
viaGoogle: true,
|
|
57
|
+
viaGithub: true,
|
|
58
|
+
viaTwitter: true,
|
|
59
|
+
viaFacebook: true
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const ResetPasswordTemplate = (args) => {
|
|
63
|
+
return (
|
|
64
|
+
<HawaProvider theme={{ ...defaultTheme }}>
|
|
65
|
+
<ResetPasswordForm {...args} />
|
|
66
|
+
</HawaProvider>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
export const ResetPassword = ResetPasswordTemplate.bind({});
|
|
70
|
+
ResetPassword.args = {};
|
|
71
|
+
const NewPasswordTemplate = (args) => {
|
|
72
|
+
return (
|
|
73
|
+
<HawaProvider theme={{ ...defaultTheme }}>
|
|
74
|
+
<NewPasswordForm {...args} />
|
|
75
|
+
</HawaProvider>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
export const NewPassword = NewPasswordTemplate.bind({});
|
|
79
|
+
NewPassword.args = {};
|