@sikka/hawa 0.0.16 → 0.0.19
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/README.md +0 -8
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/blocks/Account/UserProfileForm.js +1 -1
- package/src/blocks/Account/UserSettingsForm.js +7 -2
- package/src/blocks/AuthForms/SignUpForm.js +1 -1
- package/src/blocks/Payment/CheckoutForm.js +98 -0
- package/src/blocks/Payment/CreditCardForm.js +2 -1
- package/src/blocks/Payment/index.js +1 -0
- package/src/elements/HawaAlert.js +1 -24
- package/src/elements/HawaTable.js +60 -0
- package/src/elements/HawaTypography.js +0 -19
- package/src/elements/OfflineBanner.js +20 -0
- package/src/elements/index.js +2 -0
- package/src/layout/HawaDialog.js +45 -0
- package/src/layout/index.js +1 -0
- package/storybook-static/{6.704d1e8d.iframe.bundle.js → 6.13a534cb.iframe.bundle.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.894e2873.iframe.bundle.js +1 -0
- package/storybook-static/{runtime~main.f1ebae9b.iframe.bundle.js → runtime~main.708d7ac1.iframe.bundle.js} +1 -1
- package/storybook-static/vendors~main.ae39b38c.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.b4186832.iframe.bundle.js.LICENSE.txt → vendors~main.ae39b38c.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.ae39b38c.iframe.bundle.js.map +1 -0
- package/src/stories/BlocksStories/Account/UserProfile.stories.js +0 -45
- package/src/stories/BlocksStories/Account/UserSettings.stories.js +0 -55
- package/src/stories/BlocksStories/Auth/NewPassword.stories.js +0 -61
- package/src/stories/BlocksStories/Auth/ResetPassword.stories.js +0 -58
- package/src/stories/BlocksStories/Auth/SignIn.stories.js +0 -97
- package/src/stories/BlocksStories/Auth/SignUp.stories.js +0 -98
- package/src/stories/BlocksStories/Payment/ChargeWallet.stories.js +0 -35
- package/src/stories/BlocksStories/Payment/PayWithCreditCard.stories.js +0 -37
- package/src/stories/BlocksStories/Payment/PayWithWallet.stories.js +0 -17
- package/src/stories/BlocksStories/Payment/PaymentSelection.stories.js +0 -60
- package/src/stories/BlocksStories/Pricing/BillingPlans.stories.js +0 -63
- package/src/stories/BlocksStories/Pricing/LandingPlans.stories.js +0 -63
- package/src/stories/ElementsStories/AdaptiveButton.stories.js +0 -51
- package/src/stories/ElementsStories/Alert.stories.js +0 -41
- package/src/stories/ElementsStories/InputLabel.stories.js +0 -13
- package/src/stories/ElementsStories/ItemCard.stories.js +0 -18
- package/src/stories/ElementsStories/LogoButtons.stories.js +0 -73
- package/src/stories/ElementsStories/PricingCard.stories.js +0 -91
- package/src/stories/ElementsStories/RadioSelector.stories.js +0 -36
- package/src/stories/ElementsStories/SettingsRow.stories.js +0 -63
- package/src/stories/ElementsStories/TextField.stories.js +0 -49
- package/src/stories/Introduction.stories.mdx +0 -229
- package/src/stories/LayoutStories/AppBar.stories.js +0 -29
- package/src/stories/LayoutStories/AppLayout.stories.js +0 -52
- package/src/stories/LayoutStories/Box.stories.js +0 -36
- package/storybook-static/main.66955578.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.b4186832.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.b4186832.iframe.bundle.js.map +0 -1
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { PricingPlans } from "../../../blocks/Pricing/PricingPlans";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Blocks/Pricing/In Landing",
|
|
6
|
-
component: [PricingPlans],
|
|
7
|
-
argTypes: {
|
|
8
|
-
lang: {
|
|
9
|
-
options: ["ar", "en"],
|
|
10
|
-
control: { type: "select" }
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
args: {
|
|
14
|
-
lang: "ar"
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const InLanding = (args) => {
|
|
19
|
-
return (
|
|
20
|
-
<PricingPlans
|
|
21
|
-
{...args}
|
|
22
|
-
plans={[
|
|
23
|
-
{
|
|
24
|
-
title: "Free",
|
|
25
|
-
title_ar: "تجريبي",
|
|
26
|
-
subtitle: "For everyone",
|
|
27
|
-
subtitle_ar: "للعرب",
|
|
28
|
-
price: 0,
|
|
29
|
-
currency: "SAR",
|
|
30
|
-
cycleText: "Monthly",
|
|
31
|
-
buttonText: "Select Plan",
|
|
32
|
-
features: ["one", "two", "three"],
|
|
33
|
-
features_ar: ["واحد", "اثنين", "ثلاثة"]
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
title: "Intro",
|
|
37
|
-
title_ar: "تجريبي",
|
|
38
|
-
subtitle: "For beginners",
|
|
39
|
-
subtitle_ar: "للعرب",
|
|
40
|
-
selectedPlan: false,
|
|
41
|
-
price: 10,
|
|
42
|
-
currency: "SAR",
|
|
43
|
-
cycleText: "Monthly",
|
|
44
|
-
buttonText: "Current Plan",
|
|
45
|
-
features: ["one", "two", "three"],
|
|
46
|
-
features_ar: ["واحد", "اثنين", "ثلاثة"]
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
title: "Pro",
|
|
50
|
-
title_ar: "تجريبي",
|
|
51
|
-
subtitle: "For professionals",
|
|
52
|
-
subtitle_ar: "للعرب",
|
|
53
|
-
price: 30,
|
|
54
|
-
currency: "SAR",
|
|
55
|
-
cycleText: "Monthly",
|
|
56
|
-
buttonText: "Select Plan",
|
|
57
|
-
features: ["one", "two", "three"],
|
|
58
|
-
features_ar: ["واحد", "اثنين", "ثلاثة"]
|
|
59
|
-
}
|
|
60
|
-
]}
|
|
61
|
-
/>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Class } from "@mui/icons-material";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { AdaptiveButton } from "../../elements";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Elements/Buttons/AdaptiveButton",
|
|
7
|
-
component: AdaptiveButton,
|
|
8
|
-
argTypes: {
|
|
9
|
-
buttonText: {
|
|
10
|
-
control: "text",
|
|
11
|
-
description: "The button text",
|
|
12
|
-
table: {
|
|
13
|
-
defaultValue: { summary: "Click" }
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
showText: {
|
|
17
|
-
control: "boolean",
|
|
18
|
-
// default: true,
|
|
19
|
-
description: "Boolean to show or hide the text",
|
|
20
|
-
table: {
|
|
21
|
-
defaultValue: { summary: true },
|
|
22
|
-
type: {
|
|
23
|
-
summary: "Use Case",
|
|
24
|
-
detail:
|
|
25
|
-
"Set this property to true in large screen and false on mobile"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
args: {
|
|
31
|
-
buttonText: "Click"
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const Template = (args) => {
|
|
36
|
-
return <AdaptiveButton {...args} />;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const FullButton = Template.bind({});
|
|
40
|
-
FullButton.args = {
|
|
41
|
-
showText: true,
|
|
42
|
-
// buttonText: "Full Button",
|
|
43
|
-
icon: <Class />
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const IconOnly = Template.bind({});
|
|
47
|
-
IconOnly.args = {
|
|
48
|
-
showText: false,
|
|
49
|
-
icon: <Class />,
|
|
50
|
-
buttonText: "test"
|
|
51
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { HawaAlert } from "../../elements";
|
|
4
|
-
|
|
5
|
-
const Template = (args) => {
|
|
6
|
-
return (
|
|
7
|
-
<>
|
|
8
|
-
<HawaAlert
|
|
9
|
-
title="What?"
|
|
10
|
-
text="This is a success alert"
|
|
11
|
-
severity="success"
|
|
12
|
-
/>
|
|
13
|
-
<HawaAlert text="This is an info alert" severity="info" />
|
|
14
|
-
<HawaAlert text="This is a warning alert" severity="warning" />
|
|
15
|
-
<HawaAlert text="This is an error alert" severity="error" />
|
|
16
|
-
</>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
//types:
|
|
20
|
-
//error (red)
|
|
21
|
-
//warning (red)
|
|
22
|
-
//notice (blue)
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
title: "UI/Alert",
|
|
26
|
-
component: HawaAlert,
|
|
27
|
-
argTypes: {
|
|
28
|
-
theme: {
|
|
29
|
-
options: ["primary", "secondary", "default"],
|
|
30
|
-
control: { type: "select" }
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
args: {
|
|
34
|
-
theme: "primary"
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const Default = Template.bind({});
|
|
39
|
-
Default.args = {
|
|
40
|
-
theme: "primary"
|
|
41
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { storiesOf } from "@storybook/react";
|
|
2
|
-
import { HawaInputLabel } from "../../elements";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/InputLabel",
|
|
6
|
-
component: [HawaInputLabel],
|
|
7
|
-
argTypes: {
|
|
8
|
-
resize: {
|
|
9
|
-
options: ["vertical", "horizontal", "both"],
|
|
10
|
-
control: { type: "radio" }
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Container } from "@mui/material";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { HawaCard } from "../../elements";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Elements/Cards/Items",
|
|
7
|
-
component: [HawaCard],
|
|
8
|
-
argTypes: {
|
|
9
|
-
buttonLabel: {
|
|
10
|
-
control: "text",
|
|
11
|
-
description: "The text next to the logo"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const Items = (args) => {
|
|
17
|
-
return <HawaCard />;
|
|
18
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Container } from "@mui/material";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { ActionButton, HawaLogoButton } from "../../elements";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Elements/Buttons/LogoButtons",
|
|
7
|
-
component: HawaLogoButton,
|
|
8
|
-
argTypes: {
|
|
9
|
-
buttonLabel: {
|
|
10
|
-
control: "text",
|
|
11
|
-
description: "The text next to the logo"
|
|
12
|
-
},
|
|
13
|
-
logo: {
|
|
14
|
-
control: "select",
|
|
15
|
-
options: [
|
|
16
|
-
"google",
|
|
17
|
-
"twitter",
|
|
18
|
-
"github",
|
|
19
|
-
"paypal",
|
|
20
|
-
"applepay",
|
|
21
|
-
"googlepay",
|
|
22
|
-
"stcpay",
|
|
23
|
-
"mada",
|
|
24
|
-
"visa/master"
|
|
25
|
-
],
|
|
26
|
-
description: "a brand name that will display the logo accordingly",
|
|
27
|
-
table: {
|
|
28
|
-
type: {
|
|
29
|
-
summary: "Examples",
|
|
30
|
-
detail: "google, twitter, github, paypal, applepay, googlepay"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const Template = (args) => {
|
|
38
|
-
return (
|
|
39
|
-
<Container maxWidth="xs" variant="plain">
|
|
40
|
-
<HawaLogoButton logo={args.logo} buttonText={args.buttonLabel} />
|
|
41
|
-
</Container>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const Google = Template.bind({});
|
|
46
|
-
Google.args = { buttonLabel: "Sign in via Google", logo: "google" };
|
|
47
|
-
|
|
48
|
-
export const Twitter = Template.bind({});
|
|
49
|
-
Twitter.args = { buttonLabel: "Sign in via Twitter", logo: "twitter" };
|
|
50
|
-
|
|
51
|
-
export const Github = Template.bind({});
|
|
52
|
-
Github.args = { buttonLabel: "Sign in via Github", logo: "github" };
|
|
53
|
-
|
|
54
|
-
export const WalletPay = Template.bind({});
|
|
55
|
-
WalletPay.args = { buttonLabel: "Pay with Wallet", logo: "wallet" };
|
|
56
|
-
|
|
57
|
-
export const GooglePay = Template.bind({});
|
|
58
|
-
GooglePay.args = { buttonLabel: "Google Pay", logo: "googlepay" };
|
|
59
|
-
|
|
60
|
-
export const ApplePay = Template.bind({});
|
|
61
|
-
ApplePay.args = { buttonLabel: "Apple Pay", logo: "applepay" };
|
|
62
|
-
|
|
63
|
-
export const STCPay = Template.bind({});
|
|
64
|
-
STCPay.args = { buttonLabel: "STC Pay", logo: "stcpay" };
|
|
65
|
-
|
|
66
|
-
export const VisaMasterPay = Template.bind({});
|
|
67
|
-
VisaMasterPay.args = { buttonLabel: "Visa / Mastercard", logo: "visa/master" };
|
|
68
|
-
|
|
69
|
-
export const PayPal = Template.bind({});
|
|
70
|
-
PayPal.args = { buttonLabel: "PayPal", logo: "paypal" };
|
|
71
|
-
|
|
72
|
-
export const Mada = Template.bind({});
|
|
73
|
-
Mada.args = { buttonLabel: "Mada", logo: "mada" };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HawaPricingCard } from "../../elements";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Elements/Cards/Pricing",
|
|
6
|
-
component: [HawaPricingCard],
|
|
7
|
-
argTypes: {
|
|
8
|
-
title: {
|
|
9
|
-
control: "text",
|
|
10
|
-
description: "The title of the pricing package"
|
|
11
|
-
},
|
|
12
|
-
subtitle: {
|
|
13
|
-
control: "text",
|
|
14
|
-
description: "The subtitle of the pricing package"
|
|
15
|
-
},
|
|
16
|
-
price: {
|
|
17
|
-
control: "number",
|
|
18
|
-
description: "The price of the pricing package"
|
|
19
|
-
},
|
|
20
|
-
currency: {
|
|
21
|
-
control: "text",
|
|
22
|
-
description: "The currency of the price",
|
|
23
|
-
table: {
|
|
24
|
-
type: {
|
|
25
|
-
summary: "Examples",
|
|
26
|
-
detail: "$, SAR, ريال, دولار"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
cycleText: {
|
|
31
|
-
control: "text",
|
|
32
|
-
description: "The cycle period of the payment",
|
|
33
|
-
table: {
|
|
34
|
-
type: {
|
|
35
|
-
summary: "Examples",
|
|
36
|
-
detail: "Monthly, Annually, Quarterly, Every 3 Months, Every 6 Months"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
features: {
|
|
41
|
-
control: "array",
|
|
42
|
-
description: "An Array of strings for the package features"
|
|
43
|
-
},
|
|
44
|
-
lang: {
|
|
45
|
-
control: "text",
|
|
46
|
-
description: "The language of the card to change the direction",
|
|
47
|
-
table: {
|
|
48
|
-
type: {
|
|
49
|
-
summary: "Options",
|
|
50
|
-
detail: "ar, en"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
buttonText: {
|
|
55
|
-
control: "text",
|
|
56
|
-
description: "The text of the button"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
args: {
|
|
60
|
-
title: "Pro",
|
|
61
|
-
subtitle: "For small businesses",
|
|
62
|
-
price: 300,
|
|
63
|
-
currency: "$",
|
|
64
|
-
cycleText: "Monthly",
|
|
65
|
-
buttonText: "Select Plan"
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export const LTR = (args) => {
|
|
70
|
-
return (
|
|
71
|
-
<HawaPricingCard
|
|
72
|
-
{...args}
|
|
73
|
-
features={["Unlimited Menus", "Unlimited Items", "Custom Handle"]}
|
|
74
|
-
/>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export const RTL = (args) => {
|
|
79
|
-
return (
|
|
80
|
-
<HawaPricingCard
|
|
81
|
-
lang="ar"
|
|
82
|
-
title="الإحترافي"
|
|
83
|
-
subtitle="للمنشئات الصغيرة"
|
|
84
|
-
price="300"
|
|
85
|
-
currency="ريال"
|
|
86
|
-
cycleText="كل 6 أشهر"
|
|
87
|
-
buttonText="إختر الباقة"
|
|
88
|
-
features={["قوائم لا محدودة", "عناصر لا محدودة", "أسم مخصص"]}
|
|
89
|
-
/>
|
|
90
|
-
);
|
|
91
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HawaRadio } from "../../elements";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Elements/Selections/Panel Tabs",
|
|
6
|
-
component: [HawaRadio],
|
|
7
|
-
argTypes: {
|
|
8
|
-
options: {
|
|
9
|
-
control: "array",
|
|
10
|
-
description: "An array of objects containing the option label and value",
|
|
11
|
-
table: {
|
|
12
|
-
type: {
|
|
13
|
-
summary: "Object Example",
|
|
14
|
-
detail: "{label: 'Option 1', value: 'option1'}"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
args: {
|
|
20
|
-
options: 3
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const PanelTabs = (args) => {
|
|
25
|
-
let allOptions = Array.from({ length: args.options }, (v, i) => {
|
|
26
|
-
return { label: `Option ${i}`, value: `option${i}` };
|
|
27
|
-
});
|
|
28
|
-
return (
|
|
29
|
-
<HawaRadio
|
|
30
|
-
{...args}
|
|
31
|
-
handleChange={(e) => console.log("changing to ", e)}
|
|
32
|
-
defaultValue="option1"
|
|
33
|
-
options={allOptions}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HawaSettingsRow } from "../../elements";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Elements/Settings/Row",
|
|
6
|
-
component: [HawaSettingsRow],
|
|
7
|
-
parameters: {
|
|
8
|
-
backgrounds: {
|
|
9
|
-
default: 'twitter',
|
|
10
|
-
values: [
|
|
11
|
-
{
|
|
12
|
-
name: 'light',
|
|
13
|
-
value: '#00aced',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'dark',
|
|
17
|
-
value: '#3b5998',
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
// backgrounds: [{ name: "dark background", value: "#000", default: true }]
|
|
22
|
-
},
|
|
23
|
-
argTypes: {
|
|
24
|
-
settingsType: {
|
|
25
|
-
options: ["checkbox", "text", "radio"],
|
|
26
|
-
control: { type: "select" }
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const CheckboxSettings = (args) => <HawaSettingsRow {...args} />;
|
|
32
|
-
CheckboxSettings.args = {
|
|
33
|
-
settingsType: "checkbox",
|
|
34
|
-
settingsLabel: "Text Settings"
|
|
35
|
-
};
|
|
36
|
-
export const TextSettings = (args) => (
|
|
37
|
-
<HawaSettingsRow placeholder="Text here" {...args} />
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
TextSettings.args = {
|
|
41
|
-
settingsType: "text",
|
|
42
|
-
settingsLabel: "Text Settings"
|
|
43
|
-
};
|
|
44
|
-
export const RadioSettings = (args) => {
|
|
45
|
-
let allOptions = Array.from({ length: args.options }, (v, i) => {
|
|
46
|
-
return { label: `Option ${i}`, value: `option${i}` };
|
|
47
|
-
});
|
|
48
|
-
return (
|
|
49
|
-
<HawaSettingsRow
|
|
50
|
-
settingsType={args.settingsType}
|
|
51
|
-
settingsLabel={args.settingsLabel}
|
|
52
|
-
handleChange={(e) => console.log("changing to ", e)}
|
|
53
|
-
defaultValue="option1"
|
|
54
|
-
options={allOptions}
|
|
55
|
-
/>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
RadioSettings.args = {
|
|
60
|
-
options: 3,
|
|
61
|
-
settingsType: "radio",
|
|
62
|
-
settingsLabel: "Radio Settings"
|
|
63
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HawaTextField } from "../../elements";
|
|
3
|
-
|
|
4
|
-
const Template = (args) => {
|
|
5
|
-
return <HawaTextField {...args} />;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: "UI/TextField",
|
|
10
|
-
component: HawaTextField,
|
|
11
|
-
argsTypes: {
|
|
12
|
-
type: {
|
|
13
|
-
name: "type",
|
|
14
|
-
type: { name: "string", required: true },
|
|
15
|
-
options: ["text", "number", "date"],
|
|
16
|
-
control: { type: "radio" },
|
|
17
|
-
defaultValue: "text",
|
|
18
|
-
description: "Styled Text Field",
|
|
19
|
-
table: {
|
|
20
|
-
type: { summary: "string" },
|
|
21
|
-
defaultValue: { summary: "Hello" }
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
// args: {
|
|
26
|
-
// bdRadius: 15,
|
|
27
|
-
// defaultValue: "Test",
|
|
28
|
-
// type: "date"
|
|
29
|
-
// }
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const Light = Template.bind({});
|
|
33
|
-
export const Dark = Template.bind({});
|
|
34
|
-
|
|
35
|
-
Light.args = {
|
|
36
|
-
placeholder: "Exemple ...",
|
|
37
|
-
defaultValue: "This isko default value",
|
|
38
|
-
inputLabel: "Text Field",
|
|
39
|
-
bgColor: "lightgray",
|
|
40
|
-
padding: 10
|
|
41
|
-
// type: "number"
|
|
42
|
-
};
|
|
43
|
-
Dark.args = {
|
|
44
|
-
placeholder: "Exemple ...",
|
|
45
|
-
defaultValue: "This is default value",
|
|
46
|
-
inputLabel: "Text Field",
|
|
47
|
-
bgColor: "lightgray",
|
|
48
|
-
padding: 10
|
|
49
|
-
};
|