@appcorp/kismaa-web-ui 0.3.5 → 0.3.8
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/organisms/horoscope-details-section/horoscope-details-section.js +5 -5
- package/organisms/horoscope-details-section/horoscope-details-sections.stories.d.ts +10 -0
- package/organisms/horoscope-details-section/props.js +10 -0
- package/organisms/horoscope-details-section/type.d.ts +10 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { camelToSentenceCase, DATE_FORMATS, formatDate, } from '@react-pakistan/
|
|
|
5
5
|
import { VistaTextInputV1 } from '@appcorp/app-corp-vista/molecules/vista-text-input-v1';
|
|
6
6
|
import { VistaButtonV1 } from '@appcorp/app-corp-vista/molecules/vista-button-v1/vista-button-v1';
|
|
7
7
|
export var HoroscopeDetailsSection = function (_a) {
|
|
8
|
-
var breadcrumbs = _a.breadcrumbs, characteristics = _a.characteristics, dateRange = _a.dateRange, heading = _a.heading, intro = _a.intro, items = _a.items;
|
|
8
|
+
var breadcrumbs = _a.breadcrumbs, characteristics = _a.characteristics, dateRange = _a.dateRange, heading = _a.heading, intro = _a.intro, items = _a.items, name = _a.name, email = _a.email, dob = _a.dob, handleName = _a.handleName, handleEmail = _a.handleEmail, handleDob = _a.handleDob, handleAddMeClick = _a.handleAddMeClick, nameError = _a.nameError, emailError = _a.emailError, dobError = _a.dobError;
|
|
9
9
|
var date = new Date().toISOString();
|
|
10
10
|
var formattedDate = formatDate(date, DATE_FORMATS.DAY_DD_MM_YYYY);
|
|
11
11
|
return (React.createElement("section", { className: "kismaa-section-spacing bg-white" },
|
|
@@ -24,10 +24,10 @@ export var HoroscopeDetailsSection = function (_a) {
|
|
|
24
24
|
React.createElement("div", { className: "kismaa-container" },
|
|
25
25
|
React.createElement("p", { className: "font-secondary text-2xl font-bold" }, "Receive FREE daily horoscopes and exclusive promotions"),
|
|
26
26
|
React.createElement("div", { className: "grid grid-cols-1 gap-x-4 gap-y-6 py-4 md:grid-cols-2 lg:grid-cols-4" },
|
|
27
|
-
React.createElement(VistaTextInputV1, {
|
|
28
|
-
React.createElement(VistaTextInputV1, {
|
|
29
|
-
React.createElement(VistaTextInputV1, {
|
|
30
|
-
React.createElement(VistaButtonV1, { label: "Add me!", handleOnClick:
|
|
27
|
+
React.createElement(VistaTextInputV1, { error: nameError, handleOnChange: handleName, id: "name", placeholder: "Name", required: true, value: name }),
|
|
28
|
+
React.createElement(VistaTextInputV1, { error: emailError, handleOnChange: handleEmail, id: "email", placeholder: "Email", required: true, value: email }),
|
|
29
|
+
React.createElement(VistaTextInputV1, { error: dobError, handleOnChange: handleDob, id: "dob", placeholder: "Date of Birth (MM/DD)", required: true, value: dob }),
|
|
30
|
+
React.createElement(VistaButtonV1, { label: "Add me!", handleOnClick: handleAddMeClick })),
|
|
31
31
|
React.createElement("div", { className: "mx-auto max-w-3xl" },
|
|
32
32
|
React.createElement("p", { className: "text-center text-sm text-gray-400" },
|
|
33
33
|
"As part of this service, you may also receive occasional exclusive promotions from Kismaa.com. You may unsubscribe at any time. By clicking the button above, I have read and agree to the",
|
|
@@ -9,8 +9,18 @@ export declare const HoroscopeDetailsSectionStory: {
|
|
|
9
9
|
breadcrumbs: import("../../molecules/breadcrumbs").BreadcrumbsProps;
|
|
10
10
|
characteristics: Record<string, string | string[]>;
|
|
11
11
|
dateRange: string[];
|
|
12
|
+
dob: string;
|
|
13
|
+
dobError?: string;
|
|
14
|
+
email: string;
|
|
15
|
+
emailError?: string;
|
|
16
|
+
handleAddMeClick: () => void;
|
|
17
|
+
handleDob: (key: string, value: string) => void;
|
|
18
|
+
handleEmail: (key: string, value: string) => void;
|
|
19
|
+
handleName: (key: string, value: string) => void;
|
|
12
20
|
heading: string;
|
|
13
21
|
intro: string[];
|
|
14
22
|
items: import("./type").HoroscopeFaqItem[];
|
|
23
|
+
name: string;
|
|
24
|
+
nameError?: string;
|
|
15
25
|
};
|
|
16
26
|
};
|
|
@@ -35,4 +35,14 @@ export var horoscopeDetailsSectionData = {
|
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
],
|
|
38
|
+
name: '',
|
|
39
|
+
dob: '',
|
|
40
|
+
email: '',
|
|
41
|
+
handleAddMeClick: function () { },
|
|
42
|
+
handleDob: function (value) { return console.log(value); },
|
|
43
|
+
handleEmail: function (value) { return console.log(value); },
|
|
44
|
+
handleName: function (value) { return console.log(value); },
|
|
45
|
+
nameError: undefined,
|
|
46
|
+
emailError: undefined,
|
|
47
|
+
dobError: undefined,
|
|
38
48
|
};
|
|
@@ -7,7 +7,17 @@ export interface HoroscopeDetailsSectionTypes {
|
|
|
7
7
|
breadcrumbs: BreadcrumbsProps;
|
|
8
8
|
characteristics: Record<string, string | string[]>;
|
|
9
9
|
dateRange: string[];
|
|
10
|
+
dob: string;
|
|
11
|
+
dobError?: string;
|
|
12
|
+
email: string;
|
|
13
|
+
emailError?: string;
|
|
14
|
+
handleAddMeClick: () => void;
|
|
15
|
+
handleDob: (key: string, value: string) => void;
|
|
16
|
+
handleEmail: (key: string, value: string) => void;
|
|
17
|
+
handleName: (key: string, value: string) => void;
|
|
10
18
|
heading: string;
|
|
11
19
|
intro: string[];
|
|
12
20
|
items: HoroscopeFaqItem[];
|
|
21
|
+
name: string;
|
|
22
|
+
nameError?: string;
|
|
13
23
|
}
|