@agilant/toga-blox 1.0.8 → 1.0.9
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/assets/cable.jpg +0 -0
- package/assets/card-1.jpg +0 -0
- package/assets/cat-logo.png +0 -0
- package/assets/item.jpg +0 -0
- package/assets/map.png +0 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/clover.xml +953 -0
- package/coverage/coverage-final.json +74 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +551 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/toga-blox-npm/index.html +131 -0
- package/coverage/toga-blox-npm/postcss.config.js.html +103 -0
- package/coverage/toga-blox-npm/src/components/Badge/Badge.stories.tsx.html +793 -0
- package/coverage/toga-blox-npm/src/components/Badge/Badge.tsx.html +247 -0
- package/coverage/toga-blox-npm/src/components/Badge/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Card/Card.stories.tsx.html +787 -0
- package/coverage/toga-blox-npm/src/components/Card/Card.tsx.html +163 -0
- package/coverage/toga-blox-npm/src/components/Card/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/CategoryCardTemplate.tsx.html +343 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/CompassCardTemplate.tsx.html +259 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/CounterContentCardTemplate.tsx.html +685 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/HorizontalCardTemplate.tsx.html +637 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/ItemCardTemplate.tsx.html +550 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/KitContentCardTemplate.tsx.html +469 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/ShippingAddressCardTemplate.tsx.html +418 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/VerticalCardTemplate.tsx.html +592 -0
- package/coverage/toga-blox-npm/src/components/Card/templates/index.html +221 -0
- package/coverage/toga-blox-npm/src/components/CounterButton/CounterButton.stories.tsx.html +358 -0
- package/coverage/toga-blox-npm/src/components/CounterButton/CounterButton.tsx.html +385 -0
- package/coverage/toga-blox-npm/src/components/CounterButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Description/Description.stories.tsx.html +286 -0
- package/coverage/toga-blox-npm/src/components/Description/Description.tsx.html +124 -0
- package/coverage/toga-blox-npm/src/components/Description/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/DropDownIconButton/DropDownIconButton.stories.tsx.html +676 -0
- package/coverage/toga-blox-npm/src/components/DropDownIconButton/DropDownIconButton.tsx.html +346 -0
- package/coverage/toga-blox-npm/src/components/DropDownIconButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Footer/ContactInfoItem.tsx.html +139 -0
- package/coverage/toga-blox-npm/src/components/Footer/Footer.stories.tsx.html +934 -0
- package/coverage/toga-blox-npm/src/components/Footer/Footer.tsx.html +373 -0
- package/coverage/toga-blox-npm/src/components/Footer/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/FormButton/FormButton.stories.tsx.html +952 -0
- package/coverage/toga-blox-npm/src/components/FormButton/FormButton.tsx.html +343 -0
- package/coverage/toga-blox-npm/src/components/FormButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/GenericList/GenericList.stories.tsx.html +376 -0
- package/coverage/toga-blox-npm/src/components/GenericList/GenericList.tsx.html +520 -0
- package/coverage/toga-blox-npm/src/components/GenericList/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/GenericList/templates/DummyDataList.tsx.html +154 -0
- package/coverage/toga-blox-npm/src/components/GenericList/templates/DynamicIconList.tsx.html +250 -0
- package/coverage/toga-blox-npm/src/components/GenericList/templates/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/GetSupport/GetSupport.stories.tsx.html +325 -0
- package/coverage/toga-blox-npm/src/components/GetSupport/GetSupport.tsx.html +262 -0
- package/coverage/toga-blox-npm/src/components/GetSupport/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/HamburgerButton/Hamburger.stories.tsx.html +760 -0
- package/coverage/toga-blox-npm/src/components/HamburgerButton/HamburgerButton.tsx.html +232 -0
- package/coverage/toga-blox-npm/src/components/HamburgerButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Header/Header.stories.tsx.html +1633 -0
- package/coverage/toga-blox-npm/src/components/Header/Header.tsx.html +814 -0
- package/coverage/toga-blox-npm/src/components/Header/headerContext.tsx.html +460 -0
- package/coverage/toga-blox-npm/src/components/Header/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/Hero/Hero.stories.tsx.html +289 -0
- package/coverage/toga-blox-npm/src/components/Hero/Hero.tsx.html +259 -0
- package/coverage/toga-blox-npm/src/components/Hero/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/IconButton/IconButton.stories.tsx.html +673 -0
- package/coverage/toga-blox-npm/src/components/IconButton/IconButton.tsx.html +313 -0
- package/coverage/toga-blox-npm/src/components/IconButton/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Image/Image.stories.tsx.html +322 -0
- package/coverage/toga-blox-npm/src/components/Image/Image.tsx.html +226 -0
- package/coverage/toga-blox-npm/src/components/Image/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Input/Input.stories.tsx.html +1621 -0
- package/coverage/toga-blox-npm/src/components/Input/Input.tsx.html +568 -0
- package/coverage/toga-blox-npm/src/components/Input/InputMemoTypes.tsx.html +181 -0
- package/coverage/toga-blox-npm/src/components/Input/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/MobileMenu/MobileMenu.tsx.html +208 -0
- package/coverage/toga-blox-npm/src/components/MobileMenu/index.html +116 -0
- package/coverage/toga-blox-npm/src/components/Nav/Nav.stories.tsx.html +628 -0
- package/coverage/toga-blox-npm/src/components/Nav/Nav.tsx.html +622 -0
- package/coverage/toga-blox-npm/src/components/Nav/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Page/TableDataDummy.tsx.html +733 -0
- package/coverage/toga-blox-npm/src/components/Page/ViewPageTemplate.stories.tsx.html +1714 -0
- package/coverage/toga-blox-npm/src/components/Page/ViewPageTemplate.tsx.html +115 -0
- package/coverage/toga-blox-npm/src/components/Page/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/PageSection/PageSection.stories.tsx.html +433 -0
- package/coverage/toga-blox-npm/src/components/PageSection/PageSection.tsx.html +121 -0
- package/coverage/toga-blox-npm/src/components/PageSection/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/SearchInput/SearchInput.stories.tsx.html +517 -0
- package/coverage/toga-blox-npm/src/components/SearchInput/SearchInput.tsx.html +325 -0
- package/coverage/toga-blox-npm/src/components/SearchInput/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Slider/Slider.stories.tsx.html +349 -0
- package/coverage/toga-blox-npm/src/components/Slider/Slider.tsx.html +502 -0
- package/coverage/toga-blox-npm/src/components/Slider/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Submenus/AdminSubmenu.tsx.html +136 -0
- package/coverage/toga-blox-npm/src/components/Submenus/AlertSubmenu.tsx.html +253 -0
- package/coverage/toga-blox-npm/src/components/Submenus/AlertSubmenuItem.tsx.html +202 -0
- package/coverage/toga-blox-npm/src/components/Submenus/index.html +146 -0
- package/coverage/toga-blox-npm/src/components/Text/Text.stories.tsx.html +235 -0
- package/coverage/toga-blox-npm/src/components/Text/Text.tsx.html +172 -0
- package/coverage/toga-blox-npm/src/components/Text/index.html +131 -0
- package/coverage/toga-blox-npm/src/components/Toaster/Toaster.stories.tsx.html +445 -0
- package/coverage/toga-blox-npm/src/components/Toaster/Toaster.tsx.html +301 -0
- package/coverage/toga-blox-npm/src/components/Toaster/index.html +131 -0
- package/coverage/toga-blox-npm/src/hoc/styling/index.html +116 -0
- package/coverage/toga-blox-npm/src/hoc/styling/withStoryBook.tsx.html +142 -0
- package/coverage/toga-blox-npm/src/userHoc/index.html +116 -0
- package/coverage/toga-blox-npm/src/userHoc/withMemo.tsx.html +145 -0
- package/coverage/toga-blox-npm/src/utils/assertTagName.tsx.html +106 -0
- package/coverage/toga-blox-npm/src/utils/generateAccordionItem.tsx.html +373 -0
- package/coverage/toga-blox-npm/src/utils/generateFooterContacts.tsx.html +295 -0
- package/coverage/toga-blox-npm/src/utils/generateNavMenu.tsx.html +247 -0
- package/coverage/toga-blox-npm/src/utils/generateSocialList.tsx.html +187 -0
- package/coverage/toga-blox-npm/src/utils/getFontAwesomeIcon.tsx.html +145 -0
- package/coverage/toga-blox-npm/src/utils/index.html +206 -0
- package/coverage/toga-blox-npm/src/utils/inputValidation.tsx.html +163 -0
- package/coverage/toga-blox-npm/tailwind.config.js.html +205 -0
- package/declarations.d.ts +1 -1
- package/package.json +5 -6
- package/src/components/Badge/Badge.stories.tsx +110 -207
- package/src/components/Badge/Badge.test.tsx +40 -41
- package/src/components/Badge/Badge.tsx +29 -99
- package/src/components/Badge/Badge.types.tsx +12 -23
- package/src/components/Card/Card.stories.tsx +166 -22
- package/src/components/Card/Card.test.tsx +3 -3
- package/src/components/Card/Card.tsx +12 -16
- package/src/components/Card/DUMMYPRODUCTDATA.json +381 -225
- package/src/components/Card/templates/CategoryCardTemplate.tsx +86 -0
- package/src/components/Card/templates/CompassCardTemplate.tsx +1 -1
- package/src/components/Card/templates/CounterContentCardTemplate.tsx +200 -0
- package/src/components/Card/templates/ItemCardTemplate.tsx +155 -0
- package/src/components/Card/templates/KitContentCardTemplate.tsx +128 -0
- package/src/components/Card/templates/ShippingAddressCardTemplate.tsx +111 -0
- package/src/components/Card/templates/VerticalCardTemplate.tsx +100 -85
- package/src/components/CounterButton/CounterButton.tsx +1 -1
- package/src/components/Description/Description.stories.tsx +67 -0
- package/src/components/Description/Description.tsx +13 -0
- package/src/components/Description/Description.types.ts +9 -0
- package/src/components/DropDownIconButton/DropDownIconButton.stories.tsx +197 -0
- package/src/components/DropDownIconButton/DropDownIconButton.test.tsx +90 -0
- package/src/components/DropDownIconButton/DropDownIconButton.tsx +87 -0
- package/src/components/DropDownIconButton/DropDownIconButton.types.ts +21 -0
- package/src/components/DropDownIconButton/index.ts +2 -0
- package/src/components/Footer/ContactInfoItem.tsx +8 -10
- package/src/components/Footer/Footer.stories.tsx +13 -22
- package/src/components/Footer/Footer.tsx +25 -88
- package/src/components/Footer/Footer.types.tsx +2 -2
- package/src/components/FormButton/FormButton.stories.tsx +101 -226
- package/src/components/FormButton/FormButton.test.tsx +1 -1
- package/src/components/FormButton/FormButton.tsx +34 -42
- package/src/components/FormButton/FormButton.types.ts +7 -13
- package/src/components/GenericList/GenericList.stories.tsx +5 -12
- package/src/components/GenericList/GenericList.tsx +91 -92
- package/src/components/GenericList/templates/DynamicIconList.tsx +45 -64
- package/src/components/GetSupport/GetSupport.stories.tsx +80 -0
- package/src/components/GetSupport/GetSupport.test.tsx +62 -0
- package/src/components/GetSupport/GetSupport.tsx +59 -0
- package/src/components/GetSupport/GetSupport.types.ts +11 -0
- package/src/components/HamburgerButton/Hamburger.stories.tsx +225 -0
- package/src/components/HamburgerButton/HamburgerButton.tsx +37 -56
- package/src/components/HamburgerButton/HamburgerButton.types.tsx +2 -1
- package/src/components/Header/Header.stories.tsx +3 -5
- package/src/components/Header/Header.tsx +37 -83
- package/src/components/Hero/Hero.stories.tsx +1 -2
- package/src/components/IconButton/IconButton.stories.tsx +196 -0
- package/src/components/{Icon/Icon.test.tsx → IconButton/IconButton.test.tsx} +3 -4
- package/src/components/IconButton/IconButton.tsx +76 -0
- package/src/components/IconButton/IconButton.types.ts +28 -0
- package/src/components/IconButton/index.ts +2 -0
- package/src/components/Image/Image.tsx +1 -1
- package/src/components/Input/Input.stories.tsx +10 -12
- package/src/components/Input/Input.test.tsx +2 -3
- package/src/components/Input/Input.tsx +41 -104
- package/src/components/MobileMenu/MobileMenu.types.tsx +0 -2
- package/src/components/Nav/DUMMYNAVDATA.json +4 -4
- package/src/components/Nav/Nav.tsx +49 -112
- package/src/components/Nav/Nav.types.tsx +14 -2
- package/src/components/Page/ViewPageTemplate.stories.tsx +2 -2
- package/src/components/Page/ViewPageTemplate.test.tsx +1 -1
- package/src/components/Page/ViewPageTemplate.types.ts +1 -1
- package/src/components/PageSection/PageSection.stories.tsx +3 -1
- package/src/components/PageSection/PageSections.test.tsx +2 -1
- package/src/components/SearchInput/SearchInput.stories.tsx +144 -0
- package/src/components/SearchInput/SearchInput.tsx +81 -0
- package/src/components/SearchInput/SearchInput.types.ts +28 -0
- package/src/components/Slider/Slider.stories.tsx +88 -0
- package/src/components/Slider/Slider.tsx +139 -0
- package/src/components/Slider/Slider.types.ts +21 -0
- package/src/components/Submenus/AdminSubmenu.tsx +17 -0
- package/src/components/Submenus/AlertSubmenu.tsx +56 -0
- package/src/components/Submenus/AlertSubmenuItem.tsx +39 -0
- package/src/components/Submenus/types.tsx +32 -0
- package/src/components/Toaster/Toaster.stories.tsx +4 -6
- package/src/components/Toaster/Toaster.test.tsx +3 -4
- package/src/components/Toaster/Toaster.tsx +9 -17
- package/src/components/Toaster/Toaster.types.ts +2 -2
- package/src/utils/assertTagName.tsx +1 -1
- package/src/utils/generateAccordionItem.tsx +7 -13
- package/src/utils/generateFooterContacts.tsx +4 -9
- package/src/utils/getFontAwesomeIcon.tsx +8 -13
- package/tailwind.config.js +11 -3
- package/src/components/Badge/badgeClassNames.tsx +0 -173
- package/src/components/Card/cardClassNames.ts +0 -49
- package/src/components/Footer/footerClassNames.tsx +0 -57
- package/src/components/FormButton/formButtonClassNames.tsx +0 -153
- package/src/components/GenericList/genericListClassNames.tsx +0 -8
- package/src/components/Header/headerClassNames.tsx +0 -50
- package/src/components/Icon/Icon.stories.tsx +0 -227
- package/src/components/Icon/Icon.tsx +0 -208
- package/src/components/Icon/Icon.types.ts +0 -24
- package/src/components/Icon/iconClassNames.ts +0 -79
- package/src/components/Icon/index.ts +0 -2
- package/src/components/Input/inputClassNames.tsx +0 -169
- package/src/components/Nav/navClassNames.tsx +0 -192
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Text from "../../Text/Text";
|
|
3
|
+
import Image from "../../Image/Image";
|
|
4
|
+
import { TagName } from "../../Text/Text.types";
|
|
5
|
+
|
|
6
|
+
type DataTypes = {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
link: string;
|
|
10
|
+
productCount: number;
|
|
11
|
+
imageBackgroundColor: string;
|
|
12
|
+
textBackgroundColor: string;
|
|
13
|
+
titleProps: {
|
|
14
|
+
tag: TagName;
|
|
15
|
+
size: string;
|
|
16
|
+
fontColor: string;
|
|
17
|
+
fontFamily: string;
|
|
18
|
+
additionalClasses: string;
|
|
19
|
+
};
|
|
20
|
+
imageUrl: string | null;
|
|
21
|
+
altText: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type CategoryCardTemplateProps = {
|
|
25
|
+
data: DataTypes;
|
|
26
|
+
containerClasses?: string;
|
|
27
|
+
imageContainerClasses?: string;
|
|
28
|
+
titleClasses?: string;
|
|
29
|
+
productCountClasses?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const CategoryCardTemplate = ({
|
|
33
|
+
data,
|
|
34
|
+
containerClasses = "",
|
|
35
|
+
imageContainerClasses = "",
|
|
36
|
+
titleClasses = "",
|
|
37
|
+
productCountClasses = "",
|
|
38
|
+
}: CategoryCardTemplateProps) => {
|
|
39
|
+
return (
|
|
40
|
+
<div className={`${containerClasses} p-4`}>
|
|
41
|
+
<a
|
|
42
|
+
href={data.link}
|
|
43
|
+
className={`${imageContainerClasses}`}
|
|
44
|
+
>
|
|
45
|
+
{data.imageUrl ? (
|
|
46
|
+
<Image
|
|
47
|
+
background={false}
|
|
48
|
+
src={data.imageUrl}
|
|
49
|
+
alt={data.altText}
|
|
50
|
+
additionalClasses="w-full h-full object-contain"
|
|
51
|
+
/>
|
|
52
|
+
) : (
|
|
53
|
+
<div className={`${data.imageBackgroundColor} flex items-center justify-center w-full h-full`}>
|
|
54
|
+
<Text
|
|
55
|
+
tag="p"
|
|
56
|
+
size="text-4xl"
|
|
57
|
+
text="🚧"
|
|
58
|
+
color="text-gray-300"
|
|
59
|
+
fontFamily=""
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
)}
|
|
63
|
+
</a>
|
|
64
|
+
<div className={titleClasses}>
|
|
65
|
+
<Text
|
|
66
|
+
tag={data.titleProps.tag}
|
|
67
|
+
size={data.titleProps.size}
|
|
68
|
+
text={data.title}
|
|
69
|
+
color={data.titleProps.fontColor}
|
|
70
|
+
fontFamily={data.titleProps.fontFamily}
|
|
71
|
+
additionalClasses={`${data.titleProps.additionalClasses} font-bold`}
|
|
72
|
+
/>
|
|
73
|
+
<Text
|
|
74
|
+
tag="p"
|
|
75
|
+
size="text-sm"
|
|
76
|
+
text={`${data.productCount} products`}
|
|
77
|
+
color="text-gray-500"
|
|
78
|
+
fontFamily="font-sans"
|
|
79
|
+
additionalClasses={productCountClasses}
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export default CategoryCardTemplate;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import Text from "../../Text/Text";
|
|
3
|
+
import Image from "../../Image/Image";
|
|
4
|
+
import Badge from "../../Badge/Badge";
|
|
5
|
+
import { TagName } from "../../Text/Text.types";
|
|
6
|
+
import CounterButton from "../../CounterButton/CounterButton";
|
|
7
|
+
import { getFontAwesomeIcon } from "../../../utils/getFontAwesomeIcon";
|
|
8
|
+
import FormButton from "../../FormButton";
|
|
9
|
+
|
|
10
|
+
type DataTypes = {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
rating: number;
|
|
14
|
+
link: string;
|
|
15
|
+
inStock: boolean;
|
|
16
|
+
inStockProps: {
|
|
17
|
+
tag: TagName;
|
|
18
|
+
size: string;
|
|
19
|
+
fontColor: string;
|
|
20
|
+
fontFamily: string;
|
|
21
|
+
inStockIcon: string;
|
|
22
|
+
outOfStockIcon: string;
|
|
23
|
+
additionalClasses: string;
|
|
24
|
+
};
|
|
25
|
+
linkTitle: boolean;
|
|
26
|
+
identifier: string;
|
|
27
|
+
titleProps: {
|
|
28
|
+
tag: TagName;
|
|
29
|
+
size: string;
|
|
30
|
+
fontColor: string;
|
|
31
|
+
fontFamily: string;
|
|
32
|
+
additionalClasses: string;
|
|
33
|
+
};
|
|
34
|
+
price: string;
|
|
35
|
+
priceProps: {
|
|
36
|
+
tag: TagName;
|
|
37
|
+
size: string;
|
|
38
|
+
fontColor: string;
|
|
39
|
+
fontFamily: string;
|
|
40
|
+
additionalClasses: string;
|
|
41
|
+
};
|
|
42
|
+
imageUrl: string | null;
|
|
43
|
+
altText: string;
|
|
44
|
+
buttonProps: {
|
|
45
|
+
text: string;
|
|
46
|
+
as: string;
|
|
47
|
+
size: string;
|
|
48
|
+
fontColor: string;
|
|
49
|
+
borderColor: string;
|
|
50
|
+
shape: string;
|
|
51
|
+
color: string;
|
|
52
|
+
hoverBackground?: string;
|
|
53
|
+
additionalClasses: string;
|
|
54
|
+
};
|
|
55
|
+
badgeText: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const truncateDescription = (description: string, maxLength: number) => {
|
|
60
|
+
if (description.length > maxLength) {
|
|
61
|
+
return description.slice(0, maxLength) + "...";
|
|
62
|
+
}
|
|
63
|
+
return description;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const CounterContentCardTemplate = ({ data }: { data: DataTypes }) => {
|
|
67
|
+
const [count, setCount] = useState(0);
|
|
68
|
+
const [inCart, setInCart] = useState(false);
|
|
69
|
+
|
|
70
|
+
const handleIncrementClick = () => {
|
|
71
|
+
setCount((prevCount) => prevCount + 1);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const handleDecrementClick = () => {
|
|
75
|
+
if (count === 1) {
|
|
76
|
+
setInCart(false);
|
|
77
|
+
setCount(0);
|
|
78
|
+
} else {
|
|
79
|
+
setCount((prevCount) => Math.max(1, prevCount - 1)); // Prevent going below 1
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
84
|
+
const value = parseInt(e.target.value, 10);
|
|
85
|
+
if (!isNaN(value) && value > 0) {
|
|
86
|
+
setCount(value);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const handleAddToCartClick = () => {
|
|
91
|
+
setInCart(true);
|
|
92
|
+
setCount(1);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const handleDeleteClick = () => {
|
|
96
|
+
setInCart(false);
|
|
97
|
+
setCount(0);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<div className="flex flex-col items-start w-full sm:w-[300px] h-auto sm:h-[350px] border border-[#DFE4EA] bg-white rounded-lg relative p-4 sm:p-4 hover:border-teal-600 hover:shadow-inner">
|
|
102
|
+
<div className="absolute top-3 left-3">
|
|
103
|
+
<Badge
|
|
104
|
+
text={
|
|
105
|
+
<Text
|
|
106
|
+
color=""
|
|
107
|
+
fontFamily="font-serif"
|
|
108
|
+
tag="p"
|
|
109
|
+
text={data.badgeText}
|
|
110
|
+
size="text-xs sm:text-sm"
|
|
111
|
+
/>
|
|
112
|
+
}
|
|
113
|
+
type="span"
|
|
114
|
+
hoverColor=""
|
|
115
|
+
backgroundColor="bg-green-100"
|
|
116
|
+
additionalClasses="flex items-center justify-center gap-1 px-2 py-1 rounded-md border-none"
|
|
117
|
+
badgeContainerClasses="text-green-800"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
<div className="flex justify-center items-center mt-4 w-full">
|
|
121
|
+
<Image
|
|
122
|
+
background={false}
|
|
123
|
+
src={data.imageUrl}
|
|
124
|
+
alt={data.altText}
|
|
125
|
+
additionalClasses="w-[100px] sm:w-[120px] h-[100px] sm:h-[120px] object-contain"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
<div className="flex flex-col items-start w-full mt-4">
|
|
129
|
+
<Text
|
|
130
|
+
tag={data.titleProps.tag as TagName}
|
|
131
|
+
size="text-md"
|
|
132
|
+
text={truncateDescription(data.title, 52)}
|
|
133
|
+
color={data.titleProps.fontColor}
|
|
134
|
+
fontFamily={data.titleProps.fontFamily}
|
|
135
|
+
additionalClasses={`${data.titleProps.additionalClasses} text-left font-bold`}
|
|
136
|
+
/>
|
|
137
|
+
<Text
|
|
138
|
+
tag="span"
|
|
139
|
+
size="text-xs sm:text-sm"
|
|
140
|
+
text={data.identifier}
|
|
141
|
+
color="text-gray-500"
|
|
142
|
+
fontFamily="font-sans"
|
|
143
|
+
additionalClasses="text-left mt-1"
|
|
144
|
+
/>
|
|
145
|
+
<Text
|
|
146
|
+
tag="p"
|
|
147
|
+
size="text-xs sm:text-sm"
|
|
148
|
+
text={truncateDescription(data.description, 52)}
|
|
149
|
+
color="text-gray-700"
|
|
150
|
+
fontFamily="font-sans"
|
|
151
|
+
additionalClasses="text-left mt-2"
|
|
152
|
+
/>
|
|
153
|
+
</div>
|
|
154
|
+
<div className="flex justify-between items-center w-full mt-4 sm:mt-auto">
|
|
155
|
+
<Text
|
|
156
|
+
tag={data.priceProps.tag as TagName}
|
|
157
|
+
size="text-sm sm:text-md"
|
|
158
|
+
text={data.price}
|
|
159
|
+
color={data.priceProps.fontColor}
|
|
160
|
+
fontFamily={data.priceProps.fontFamily}
|
|
161
|
+
additionalClasses={data.priceProps.additionalClasses}
|
|
162
|
+
/>
|
|
163
|
+
<div className="flex items-center gap-2 min-w-[120px] sm:min-w-[150px] justify-end">
|
|
164
|
+
{inCart ? (
|
|
165
|
+
<>
|
|
166
|
+
<FormButton
|
|
167
|
+
additionalClasses="w-6 sm:w-8 h-6 sm:h-8 flex items-center justify-center text-red-600"
|
|
168
|
+
icon={getFontAwesomeIcon("trash")}
|
|
169
|
+
onClick={handleDeleteClick}
|
|
170
|
+
/>
|
|
171
|
+
<CounterButton
|
|
172
|
+
count={count}
|
|
173
|
+
onIncrementClick={handleIncrementClick}
|
|
174
|
+
onDecrementClick={handleDecrementClick}
|
|
175
|
+
onInputChange={handleInputChange}
|
|
176
|
+
containerClassName="flex items-center border border-gray-300 rounded-md overflow-hidden"
|
|
177
|
+
inputClassName="w-8 h-8 text-center text-xs sm:text-sm border-none outline-none bg-white"
|
|
178
|
+
buttonClassName="w-8 h-8 flex items-center justify-center text-gray-600"
|
|
179
|
+
iconClasses="fill-current text-gray-600"
|
|
180
|
+
/>
|
|
181
|
+
</>
|
|
182
|
+
) : (
|
|
183
|
+
<FormButton
|
|
184
|
+
text="Add to Cart"
|
|
185
|
+
backgroundColor="bg-teal-600"
|
|
186
|
+
fontColor="text-white"
|
|
187
|
+
size="text-xs sm:text-sm"
|
|
188
|
+
shape="rounded-md"
|
|
189
|
+
borderColor="border-none"
|
|
190
|
+
additionalClasses="w-[100px] sm:w-[120px] h-[32px] sm:h-[40px] hover:bg-teal-800"
|
|
191
|
+
onClick={handleAddToCartClick}
|
|
192
|
+
/>
|
|
193
|
+
)}
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
);
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export default CounterContentCardTemplate;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import FormButton from "../../FormButton/FormButton";
|
|
3
|
+
import Text from "../../Text/Text";
|
|
4
|
+
import Image from "../../Image/Image";
|
|
5
|
+
import Badge from "../../Badge/Badge";
|
|
6
|
+
import { TagName } from "../../Text/Text.types";
|
|
7
|
+
|
|
8
|
+
type DataTypes = {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
rating: number;
|
|
12
|
+
link: string;
|
|
13
|
+
inStock: boolean;
|
|
14
|
+
inStockProps: {
|
|
15
|
+
tag: TagName;
|
|
16
|
+
size: string;
|
|
17
|
+
fontColor: string;
|
|
18
|
+
fontFamily: string;
|
|
19
|
+
inStockIcon: string;
|
|
20
|
+
outOfStockIcon: string;
|
|
21
|
+
additionalClasses: string;
|
|
22
|
+
};
|
|
23
|
+
linkTitle: boolean;
|
|
24
|
+
identifier: string;
|
|
25
|
+
titleProps: {
|
|
26
|
+
tag: TagName;
|
|
27
|
+
size: string;
|
|
28
|
+
fontColor: string;
|
|
29
|
+
fontFamily: string;
|
|
30
|
+
additionalClasses: string;
|
|
31
|
+
};
|
|
32
|
+
price: string;
|
|
33
|
+
priceProps: {
|
|
34
|
+
tag: TagName;
|
|
35
|
+
size: string;
|
|
36
|
+
fontColor: string;
|
|
37
|
+
fontFamily: string;
|
|
38
|
+
additionalClasses: string;
|
|
39
|
+
};
|
|
40
|
+
imageUrl: string | null;
|
|
41
|
+
altText: string;
|
|
42
|
+
buttonProps: {
|
|
43
|
+
text: string;
|
|
44
|
+
as: string;
|
|
45
|
+
size: string;
|
|
46
|
+
fontColor: string;
|
|
47
|
+
borderColor: string;
|
|
48
|
+
shape: string;
|
|
49
|
+
color: string;
|
|
50
|
+
hoverBackground?: string;
|
|
51
|
+
additionalClasses: string;
|
|
52
|
+
};
|
|
53
|
+
badgeText: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
type ItemCardTemplateProps = {
|
|
58
|
+
data: DataTypes;
|
|
59
|
+
containerClasses?: string;
|
|
60
|
+
imageContainerClasses?: string;
|
|
61
|
+
titleContainerClasses?: string;
|
|
62
|
+
descriptionContainerClasses?: string;
|
|
63
|
+
priceContainerClasses?: string;
|
|
64
|
+
buttonContainerClasses?: string;
|
|
65
|
+
badgeContainerClasses?: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const ItemCardTemplate = ({
|
|
69
|
+
data,
|
|
70
|
+
containerClasses = "",
|
|
71
|
+
imageContainerClasses = "",
|
|
72
|
+
titleContainerClasses = "",
|
|
73
|
+
descriptionContainerClasses = "",
|
|
74
|
+
priceContainerClasses = "",
|
|
75
|
+
buttonContainerClasses = "",
|
|
76
|
+
badgeContainerClasses = "",
|
|
77
|
+
}: ItemCardTemplateProps) => {
|
|
78
|
+
return (
|
|
79
|
+
<div className={`${containerClasses}`}>
|
|
80
|
+
<div className={badgeContainerClasses}>
|
|
81
|
+
<Badge
|
|
82
|
+
text={
|
|
83
|
+
<Text
|
|
84
|
+
color=""
|
|
85
|
+
fontFamily="font-serif"
|
|
86
|
+
tag="p"
|
|
87
|
+
text={data.badgeText}
|
|
88
|
+
size="text-xs sm:text-sm"
|
|
89
|
+
/>
|
|
90
|
+
}
|
|
91
|
+
type="span"
|
|
92
|
+
hoverColor=""
|
|
93
|
+
additionalClasses="flex items-center justify-center gap-[4px] px-[8px] py-[4px] sm:px-[14px] sm:py-[8px] rounded-md border-none"
|
|
94
|
+
backgroundColor="bg-green-100"
|
|
95
|
+
badgeContainerClasses="text-green-800"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
<div className={`flex justify-center items-center ${imageContainerClasses}`}>
|
|
99
|
+
<Image
|
|
100
|
+
background={false}
|
|
101
|
+
src={data.imageUrl}
|
|
102
|
+
alt={data.altText}
|
|
103
|
+
additionalClasses="object-contain max-h-full"
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
<div className={`${titleContainerClasses}`}>
|
|
107
|
+
<Text
|
|
108
|
+
tag={data.titleProps.tag as TagName}
|
|
109
|
+
size="text-sm sm:text-md"
|
|
110
|
+
text={data.title}
|
|
111
|
+
color={data.titleProps.fontColor}
|
|
112
|
+
fontFamily={data.titleProps.fontFamily}
|
|
113
|
+
additionalClasses={data.titleProps.additionalClasses}
|
|
114
|
+
/>
|
|
115
|
+
<Text
|
|
116
|
+
tag="span"
|
|
117
|
+
size="text-xs sm:text-sm"
|
|
118
|
+
text={data.identifier}
|
|
119
|
+
color="text-gray-500"
|
|
120
|
+
fontFamily="font-sans"
|
|
121
|
+
additionalClasses="mb-1 sm:mb-2"
|
|
122
|
+
/>
|
|
123
|
+
<Text
|
|
124
|
+
tag="span"
|
|
125
|
+
size="text-xs sm:text-sm"
|
|
126
|
+
text={data.description}
|
|
127
|
+
color="text-gray-500"
|
|
128
|
+
fontFamily="font-sans"
|
|
129
|
+
additionalClasses="mb-2 sm:mb-4"
|
|
130
|
+
/>
|
|
131
|
+
<div className={`${priceContainerClasses}`}>
|
|
132
|
+
<Text
|
|
133
|
+
tag={data.priceProps.tag as TagName}
|
|
134
|
+
size="text-sm sm:text-md"
|
|
135
|
+
text={data.price}
|
|
136
|
+
color={data.priceProps.fontColor}
|
|
137
|
+
fontFamily={data.priceProps.fontFamily}
|
|
138
|
+
additionalClasses={data.priceProps.additionalClasses}
|
|
139
|
+
/>
|
|
140
|
+
<FormButton
|
|
141
|
+
text={data.buttonProps.text}
|
|
142
|
+
backgroundColor={data.buttonProps.color}
|
|
143
|
+
fontColor={data.buttonProps.fontColor}
|
|
144
|
+
size="text-xs sm:text-md"
|
|
145
|
+
shape={data.buttonProps.shape}
|
|
146
|
+
borderColor={data.buttonProps.borderColor}
|
|
147
|
+
additionalClasses={`${buttonContainerClasses} hover:bg-teal-800`}
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
);
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export default ItemCardTemplate;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import FormButton from "../../FormButton/FormButton";
|
|
3
|
+
import Text from "../../Text/Text";
|
|
4
|
+
import Image from "../../Image/Image";
|
|
5
|
+
import Badge from "../../Badge/Badge";
|
|
6
|
+
import { TagName } from "../../Text/Text.types";
|
|
7
|
+
|
|
8
|
+
type DataTypes = {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
rating: number;
|
|
12
|
+
link: string;
|
|
13
|
+
inStock: boolean;
|
|
14
|
+
inStockProps: {
|
|
15
|
+
tag: TagName;
|
|
16
|
+
size: string;
|
|
17
|
+
fontColor: string;
|
|
18
|
+
fontFamily: string;
|
|
19
|
+
inStockIcon: string;
|
|
20
|
+
outOfStockIcon: string;
|
|
21
|
+
additionalClasses: string;
|
|
22
|
+
};
|
|
23
|
+
linkTitle: boolean;
|
|
24
|
+
identifier: string;
|
|
25
|
+
titleProps: {
|
|
26
|
+
tag: TagName;
|
|
27
|
+
size: string;
|
|
28
|
+
fontColor: string;
|
|
29
|
+
fontFamily: string;
|
|
30
|
+
additionalClasses: string;
|
|
31
|
+
};
|
|
32
|
+
price: string;
|
|
33
|
+
priceProps: {
|
|
34
|
+
tag: TagName;
|
|
35
|
+
size: string;
|
|
36
|
+
fontColor: string;
|
|
37
|
+
fontFamily: string;
|
|
38
|
+
additionalClasses: string;
|
|
39
|
+
};
|
|
40
|
+
imageUrl: string | null;
|
|
41
|
+
altText: string;
|
|
42
|
+
buttonProps: {
|
|
43
|
+
text: string;
|
|
44
|
+
as: string;
|
|
45
|
+
size: string;
|
|
46
|
+
fontColor: string;
|
|
47
|
+
borderColor: string;
|
|
48
|
+
shape: string;
|
|
49
|
+
color: string;
|
|
50
|
+
hoverBackground?: string;
|
|
51
|
+
additionalClasses: string;
|
|
52
|
+
};
|
|
53
|
+
badgeText: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const KitContentCardTemplate = ({ data }: { data: DataTypes }) => {
|
|
58
|
+
return (
|
|
59
|
+
<div className="flex flex-col items-start w-full sm:w-[244px] h-auto sm:h-[255px] border border-[#DFE4EA] bg-white rounded-lg relative p-3 hover:border-1 hover:border-teal-600 hover:shadow-inner">
|
|
60
|
+
<div className="absolute top-2 left-2">
|
|
61
|
+
<Badge
|
|
62
|
+
text={
|
|
63
|
+
<Text
|
|
64
|
+
color=""
|
|
65
|
+
fontFamily="font-serif"
|
|
66
|
+
tag="p"
|
|
67
|
+
text={data.badgeText}
|
|
68
|
+
size="text-xs"
|
|
69
|
+
/>
|
|
70
|
+
}
|
|
71
|
+
type="span"
|
|
72
|
+
hoverColor=""
|
|
73
|
+
backgroundColor="bg-green-100"
|
|
74
|
+
additionalClasses="flex items-center justify-center gap-1 px-2 py-1 rounded-md border-none"
|
|
75
|
+
badgeContainerClasses="text-yellow-800"
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
<div className="flex flex-col items-center gap-2 mt-6 w-full">
|
|
79
|
+
<Image
|
|
80
|
+
background={false}
|
|
81
|
+
src={data.imageUrl}
|
|
82
|
+
alt={data.altText}
|
|
83
|
+
additionalClasses="w-[80px] h-[80px] sm:w-[100px] sm:h-[100px] object-contain"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
<div className="flex flex-col items-start w-full mt-2">
|
|
87
|
+
<Text
|
|
88
|
+
tag={data.titleProps.tag as TagName}
|
|
89
|
+
size="text-xs sm:text-sm"
|
|
90
|
+
text={data.title}
|
|
91
|
+
color={data.titleProps.fontColor}
|
|
92
|
+
fontFamily={data.titleProps.fontFamily}
|
|
93
|
+
additionalClasses={`${data.titleProps.additionalClasses} text-left`}
|
|
94
|
+
/>
|
|
95
|
+
<Text
|
|
96
|
+
tag="span"
|
|
97
|
+
size="text-xs"
|
|
98
|
+
text={data.identifier}
|
|
99
|
+
color="text-slate-400"
|
|
100
|
+
fontFamily="font-sans"
|
|
101
|
+
additionalClasses="text-left"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
<div className="flex items-end justify-between w-full mt-auto">
|
|
105
|
+
<Text
|
|
106
|
+
tag={data.priceProps.tag as TagName}
|
|
107
|
+
size="text-xs sm:text-sm"
|
|
108
|
+
text={data.price}
|
|
109
|
+
color={data.priceProps.fontColor}
|
|
110
|
+
fontFamily={data.priceProps.fontFamily}
|
|
111
|
+
additionalClasses={data.priceProps.additionalClasses}
|
|
112
|
+
/>
|
|
113
|
+
<FormButton
|
|
114
|
+
text={data.buttonProps.text}
|
|
115
|
+
fontColor={data.buttonProps.fontColor}
|
|
116
|
+
backgroundColor="bg-slate-200"
|
|
117
|
+
size="text-xs"
|
|
118
|
+
shape={data.buttonProps.shape}
|
|
119
|
+
borderColor={data.buttonProps.borderColor}
|
|
120
|
+
additionalClasses="px-2 py-1 cursor-not-allowed"
|
|
121
|
+
isDisabled={true}
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export default KitContentCardTemplate;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import FormButton from "../../FormButton/FormButton";
|
|
3
|
+
import Text from "../../Text/Text";
|
|
4
|
+
import Image from "../../Image/Image";
|
|
5
|
+
import Badge from "../../Badge/Badge";
|
|
6
|
+
|
|
7
|
+
type DataTypes = {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
addressLine1: string;
|
|
11
|
+
addressLine2: string;
|
|
12
|
+
addressLine3: string;
|
|
13
|
+
imageUrl: string | null;
|
|
14
|
+
altText: string;
|
|
15
|
+
badgeText: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type ShippingAddressCardTemplateProps = {
|
|
19
|
+
data: DataTypes;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const ShippingAddressCardTemplate = ({ data }: ShippingAddressCardTemplateProps) => {
|
|
23
|
+
return (
|
|
24
|
+
<div className="flex flex-col sm:flex-row p-4 sm:p-6 m-4 sm:m-20 border border-[#00B9A8] bg-white rounded-lg w-full relative hover:border-teal-500 hover:shadow-inner">
|
|
25
|
+
<div className="flex-shrink-0 w-full sm:w-auto mb-4 sm:mb-0">
|
|
26
|
+
<Image
|
|
27
|
+
background={false}
|
|
28
|
+
src={data.imageUrl}
|
|
29
|
+
alt={data.altText}
|
|
30
|
+
additionalClasses="w-full h-auto sm:h-auto object-contain"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
<div className="flex flex-col w-full h-full sm:ml-5">
|
|
34
|
+
<Badge
|
|
35
|
+
text={
|
|
36
|
+
<Text
|
|
37
|
+
color="text-green-800"
|
|
38
|
+
fontFamily="font-serif"
|
|
39
|
+
tag="span"
|
|
40
|
+
text={data.badgeText}
|
|
41
|
+
size="text-xs"
|
|
42
|
+
/>
|
|
43
|
+
}
|
|
44
|
+
type="span"
|
|
45
|
+
hoverColor=""
|
|
46
|
+
backgroundColor="bg-green-100"
|
|
47
|
+
badgeContainerClasses="w-[fit-content] h-[fit-content]"
|
|
48
|
+
additionalClasses="flex items-center px-2 py-1 rounded-md border-none absolute top-2 left-2 sm:static"
|
|
49
|
+
/>
|
|
50
|
+
<div className="mt-2 sm:mt-0">
|
|
51
|
+
<Text
|
|
52
|
+
tag="h2"
|
|
53
|
+
size="text-lg"
|
|
54
|
+
text={data.title}
|
|
55
|
+
color="text-black"
|
|
56
|
+
fontFamily="font-serif"
|
|
57
|
+
additionalClasses="font-bold"
|
|
58
|
+
/>
|
|
59
|
+
<div className="mt-1">
|
|
60
|
+
<Text
|
|
61
|
+
tag="span"
|
|
62
|
+
size="text-sm"
|
|
63
|
+
text={data.addressLine1}
|
|
64
|
+
color="text-slate-400"
|
|
65
|
+
fontFamily="font-sans"
|
|
66
|
+
additionalClasses="block"
|
|
67
|
+
/>
|
|
68
|
+
<Text
|
|
69
|
+
tag="span"
|
|
70
|
+
size="text-sm"
|
|
71
|
+
text={data.addressLine2}
|
|
72
|
+
color="text-slate-400"
|
|
73
|
+
fontFamily="font-sans"
|
|
74
|
+
additionalClasses="block"
|
|
75
|
+
/>
|
|
76
|
+
<Text
|
|
77
|
+
tag="span"
|
|
78
|
+
size="text-sm"
|
|
79
|
+
text={data.addressLine3}
|
|
80
|
+
color="text-slate-400"
|
|
81
|
+
fontFamily="font-sans"
|
|
82
|
+
additionalClasses="block"
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
<div className="flex flex-row sm:flex-row gap-2 mt-4 sm:mt-20 w-full sm:w-auto">
|
|
87
|
+
<FormButton
|
|
88
|
+
text="Edit"
|
|
89
|
+
backgroundColor="bg-teal-600"
|
|
90
|
+
fontColor="text-white"
|
|
91
|
+
size="text-xs sm:text-sm"
|
|
92
|
+
shape="rounded-md"
|
|
93
|
+
borderColor="border-none"
|
|
94
|
+
additionalClasses="px-2 py-1 sm:px-4 sm:py-2 hover:bg-teal-800"
|
|
95
|
+
/>
|
|
96
|
+
<FormButton
|
|
97
|
+
text="Delete"
|
|
98
|
+
backgroundColor="bg-transparent"
|
|
99
|
+
fontColor="text-red-600"
|
|
100
|
+
size="text-xs sm:text-sm"
|
|
101
|
+
shape="rounded-md"
|
|
102
|
+
borderColor="border border-red-600"
|
|
103
|
+
additionalClasses="px-2 py-1 sm:px-4 sm:py-2 hover:bg-[#FFEBEE]"
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export default ShippingAddressCardTemplate;
|