@ikas/code-components-mcp 0.116.0 → 0.118.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/data/section-templates/account-info-section/children/AccountAddresses/components/AddressModal/index.tsx +6 -9
- package/data/section-templates/account-info-section/children/AccountAddresses/components/AddressModal/styles.css +1 -0
- package/data/section-templates/account-info-section/children/AccountAddresses/ikas-config-snippet.json +30 -30
- package/data/section-templates/account-info-section/children/AccountAddresses/index.tsx +12 -12
- package/data/section-templates/account-info-section/children/AccountAddresses/types.ts +1 -0
- package/data/section-templates/account-info-section/children/AccountFavorites/ikas-config-snippet.json +9 -9
- package/data/section-templates/account-info-section/children/AccountFavorites/index.tsx +3 -3
- package/data/section-templates/account-info-section/children/AccountFavorites/types.ts +1 -0
- package/data/section-templates/account-info-section/children/AccountInfoContent/ikas-config-snippet.json +16 -16
- package/data/section-templates/account-info-section/children/AccountInfoContent/index.tsx +5 -5
- package/data/section-templates/account-info-section/children/AccountInfoContent/types.ts +1 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/ikas-config-snippet.json +74 -74
- package/data/section-templates/account-info-section/children/AccountOrderDetail/index.tsx +29 -29
- package/data/section-templates/account-info-section/children/AccountOrderDetail/types.ts +1 -0
- package/data/section-templates/account-info-section/children/AccountOrders/ikas-config-snippet.json +20 -20
- package/data/section-templates/account-info-section/children/AccountOrders/index.tsx +8 -8
- package/data/section-templates/account-info-section/children/AccountOrders/types.ts +1 -0
- package/data/section-templates/account-info-section/global-types.ts +0 -2
- package/data/section-templates/account-info-section/hooks/useScrollLock.ts +0 -4
- package/data/section-templates/account-info-section/ikas-config-snippet.json +13 -13
- package/data/section-templates/account-info-section/index.tsx +5 -5
- package/data/section-templates/account-info-section/sub-components/Modal/index.tsx +4 -2
- package/data/section-templates/account-info-section/sub-components/ProductCard/index.tsx +4 -4
- package/data/section-templates/account-info-section/types.ts +1 -0
- package/data/section-templates/add-to-cart/ikas-config-snippet.json +30 -30
- package/data/section-templates/add-to-cart/index.tsx +7 -7
- package/data/section-templates/add-to-cart/types.ts +1 -0
- package/data/section-templates/blog-home-section/global-types.ts +0 -2
- package/data/section-templates/blog-home-section/ikas-config-snippet.json +18 -18
- package/data/section-templates/blog-home-section/index.tsx +3 -3
- package/data/section-templates/blog-home-section/types.ts +1 -0
- package/data/section-templates/blog-post-section/global-types.ts +0 -2
- package/data/section-templates/blog-post-section/ikas-config-snippet.json +15 -15
- package/data/section-templates/blog-post-section/index.tsx +3 -3
- package/data/section-templates/blog-post-section/types.ts +1 -0
- package/data/section-templates/bundle-products/global-types.ts +0 -2
- package/data/section-templates/bundle-products/ikas-config-snippet.json +25 -25
- package/data/section-templates/bundle-products/index.tsx +3 -3
- package/data/section-templates/bundle-products/types.ts +1 -0
- package/data/section-templates/cart-section/global-types.ts +0 -2
- package/data/section-templates/cart-section/ikas-config-snippet.json +32 -32
- package/data/section-templates/cart-section/index.tsx +13 -13
- package/data/section-templates/cart-section/sub-components/CartItem/components/BundleProducts/index.tsx +1 -1
- package/data/section-templates/cart-section/types.ts +1 -0
- package/data/section-templates/category-images-section/children/CategoryImageItem/ikas-config-snippet.json +12 -12
- package/data/section-templates/category-images-section/children/CategoryImageItem/types.ts +1 -0
- package/data/section-templates/category-images-section/global-types.ts +0 -2
- package/data/section-templates/category-images-section/ikas-config-snippet.json +11 -11
- package/data/section-templates/category-images-section/types.ts +1 -0
- package/data/section-templates/category-list-section/children/CardProductName/ikas-config-snippet.json +2 -2
- package/data/section-templates/category-list-section/children/CardProductName/types.ts +1 -0
- package/data/section-templates/category-list-section/children/CardProductPrice/ikas-config-snippet.json +1 -1
- package/data/section-templates/category-list-section/children/CardProductPrice/types.ts +1 -0
- package/data/section-templates/category-list-section/children/CardProductVariants/ikas-config-snippet.json +1 -1
- package/data/section-templates/category-list-section/children/CardProductVariants/types.ts +1 -0
- package/data/section-templates/category-list-section/components/CategoryListControls/index.tsx +1 -1
- package/data/section-templates/category-list-section/global-types.ts +0 -2
- package/data/section-templates/category-list-section/hooks/useScrollLock.ts +0 -4
- package/data/section-templates/category-list-section/ikas-config-snippet.json +50 -50
- package/data/section-templates/category-list-section/index.tsx +13 -13
- package/data/section-templates/category-list-section/sub-components/ProductCard/index.tsx +4 -4
- package/data/section-templates/category-list-section/types.ts +1 -0
- package/data/section-templates/component-renderer/additional/Features/types.ts +1 -0
- package/data/section-templates/component-renderer/additional/ProductDetail/index.tsx +1 -1
- package/data/section-templates/component-renderer/additional/ProductDetail/types.ts +1 -0
- package/data/section-templates/component-renderer/global-types.ts +0 -2
- package/data/section-templates/component-renderer/ikas-config-snippet.json +5 -5
- package/data/section-templates/component-renderer/types.ts +1 -0
- package/data/section-templates/email-verification-section/ikas-config-snippet.json +36 -36
- package/data/section-templates/email-verification-section/index.tsx +14 -14
- package/data/section-templates/email-verification-section/types.ts +1 -0
- package/data/section-templates/favorites/ikas-config-snippet.json +12 -12
- package/data/section-templates/favorites/types.ts +1 -0
- package/data/section-templates/features-section/children/FeatureItem/ikas-config-snippet.json +2 -2
- package/data/section-templates/features-section/children/FeatureItem/types.ts +1 -0
- package/data/section-templates/features-section/ikas-config-snippet.json +2 -2
- package/data/section-templates/features-section/types.ts +1 -0
- package/data/section-templates/footer-section/children/SocialMediaIcon/ikas-config-snippet.json +1 -1
- package/data/section-templates/footer-section/children/SocialMediaIcon/types.ts +1 -0
- package/data/section-templates/footer-section/ikas-config-snippet.json +19 -19
- package/data/section-templates/footer-section/index.tsx +3 -3
- package/data/section-templates/footer-section/types.ts +1 -0
- package/data/section-templates/forgot-password-section/components/ForgotPasswordForm/index.tsx +10 -10
- package/data/section-templates/forgot-password-section/ikas-config-snippet.json +29 -29
- package/data/section-templates/forgot-password-section/types.ts +1 -0
- package/data/section-templates/header-section/children/Announcements/ikas-config-snippet.json +9 -9
- package/data/section-templates/header-section/children/Announcements/types.ts +1 -0
- package/data/section-templates/header-section/children/CookieBar/ikas-config-snippet.json +15 -15
- package/data/section-templates/header-section/children/CookieBar/types.ts +1 -0
- package/data/section-templates/header-section/children/Navbar/components/MobileMenu/index.tsx +1 -1
- package/data/section-templates/header-section/children/Navbar/ikas-config-snippet.json +68 -68
- package/data/section-templates/header-section/children/Navbar/index.tsx +19 -19
- package/data/section-templates/header-section/children/Navbar/types.ts +1 -0
- package/data/section-templates/header-section/global-types.ts +0 -2
- package/data/section-templates/header-section/hooks/useScrollLock.ts +0 -4
- package/data/section-templates/header-section/ikas-config-snippet.json +5 -5
- package/data/section-templates/header-section/sub-components/CartItem/components/BundleProducts/index.tsx +1 -1
- package/data/section-templates/header-section/sub-components/ProductCard/index.tsx +4 -4
- package/data/section-templates/header-section/types.ts +1 -0
- package/data/section-templates/hero-slider-section/children/HeroSliderItem/ikas-config-snippet.json +34 -34
- package/data/section-templates/hero-slider-section/children/HeroSliderItem/types.ts +1 -0
- package/data/section-templates/hero-slider-section/global-types.ts +0 -2
- package/data/section-templates/hero-slider-section/ikas-config-snippet.json +10 -10
- package/data/section-templates/hero-slider-section/types.ts +1 -0
- package/data/section-templates/image-handling/global-types.ts +0 -2
- package/data/section-templates/image-handling/ikas-config-snippet.json +16 -16
- package/data/section-templates/image-handling/index.tsx +1 -1
- package/data/section-templates/image-handling/types.ts +1 -0
- package/data/section-templates/login-section/components/LoginForm/index.tsx +13 -13
- package/data/section-templates/login-section/ikas-config-snippet.json +38 -38
- package/data/section-templates/login-section/types.ts +1 -0
- package/data/section-templates/navigation/components/MobileMenu/index.tsx +1 -1
- package/data/section-templates/navigation/global-types.ts +0 -2
- package/data/section-templates/navigation/hooks/useScrollLock.ts +0 -4
- package/data/section-templates/navigation/ikas-config-snippet.json +68 -68
- package/data/section-templates/navigation/index.tsx +19 -19
- package/data/section-templates/navigation/sub-components/CartItem/components/BundleProducts/index.tsx +1 -1
- package/data/section-templates/navigation/sub-components/ProductCard/index.tsx +4 -4
- package/data/section-templates/navigation/types.ts +1 -0
- package/data/section-templates/not-found-section/ikas-config-snippet.json +9 -9
- package/data/section-templates/not-found-section/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailAddToCart/ikas-config-snippet.json +30 -30
- package/data/section-templates/product-detail-section/children/ProductDetailAddToCart/index.tsx +7 -7
- package/data/section-templates/product-detail-section/children/ProductDetailAddToCart/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/ikas-config-snippet.json +33 -33
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/index.tsx +8 -8
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/ikas-config-snippet.json +25 -25
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/index.tsx +3 -3
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailDescription/ikas-config-snippet.json +19 -19
- package/data/section-templates/product-detail-section/children/ProductDetailDescription/index.tsx +1 -1
- package/data/section-templates/product-detail-section/children/ProductDetailDescription/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailFeatures/ikas-config-snippet.json +11 -11
- package/data/section-templates/product-detail-section/children/ProductDetailFeatures/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailNameFavorite/ikas-config-snippet.json +12 -12
- package/data/section-templates/product-detail-section/children/ProductDetailNameFavorite/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/components/OfferCard/index.tsx +2 -2
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/ikas-config-snippet.json +39 -39
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/index.tsx +9 -9
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/ikas-config-snippet.json +31 -31
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/index.tsx +7 -7
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailPrices/ikas-config-snippet.json +11 -11
- package/data/section-templates/product-detail-section/children/ProductDetailPrices/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailProductGroup/ikas-config-snippet.json +11 -11
- package/data/section-templates/product-detail-section/children/ProductDetailProductGroup/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailSku/ikas-config-snippet.json +15 -15
- package/data/section-templates/product-detail-section/children/ProductDetailSku/index.tsx +1 -1
- package/data/section-templates/product-detail-section/children/ProductDetailSku/types.ts +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailVariant/ikas-config-snippet.json +13 -13
- package/data/section-templates/product-detail-section/children/ProductDetailVariant/types.ts +2 -1
- package/data/section-templates/product-detail-section/global-types.ts +0 -2
- package/data/section-templates/product-detail-section/hooks/useScrollLock.ts +0 -4
- package/data/section-templates/product-detail-section/ikas-config-snippet.json +16 -16
- package/data/section-templates/product-detail-section/index.tsx +1 -1
- package/data/section-templates/product-detail-section/types.ts +1 -0
- package/data/section-templates/product-pricing/ikas-config-snippet.json +11 -11
- package/data/section-templates/product-pricing/types.ts +1 -0
- package/data/section-templates/product-reviews-section/hooks/useScrollLock.ts +0 -4
- package/data/section-templates/product-reviews-section/ikas-config-snippet.json +6 -6
- package/data/section-templates/product-reviews-section/sub-components/Modal/index.tsx +4 -2
- package/data/section-templates/product-reviews-section/types.ts +1 -0
- package/data/section-templates/product-slider-section/children/CardProductName/ikas-config-snippet.json +2 -2
- package/data/section-templates/product-slider-section/children/CardProductName/types.ts +1 -0
- package/data/section-templates/product-slider-section/children/CardProductPrice/ikas-config-snippet.json +1 -1
- package/data/section-templates/product-slider-section/children/CardProductPrice/types.ts +1 -0
- package/data/section-templates/product-slider-section/children/CardProductVariants/ikas-config-snippet.json +1 -1
- package/data/section-templates/product-slider-section/children/CardProductVariants/types.ts +1 -0
- package/data/section-templates/product-slider-section/global-types.ts +0 -2
- package/data/section-templates/product-slider-section/ikas-config-snippet.json +22 -22
- package/data/section-templates/product-slider-section/index.tsx +4 -4
- package/data/section-templates/product-slider-section/sub-components/ProductCard/index.tsx +4 -4
- package/data/section-templates/product-slider-section/types.ts +1 -0
- package/data/section-templates/recover-password-section/components/RecoverPasswordForm/index.tsx +10 -10
- package/data/section-templates/recover-password-section/ikas-config-snippet.json +42 -42
- package/data/section-templates/recover-password-section/types.ts +1 -0
- package/data/section-templates/register-section/components/RegisterForm/index.tsx +15 -15
- package/data/section-templates/register-section/ikas-config-snippet.json +54 -54
- package/data/section-templates/register-section/types.ts +1 -0
- package/data/section-templates/rich-text-section/ikas-config-snippet.json +3 -3
- package/data/section-templates/rich-text-section/types.ts +1 -0
- package/data/section-templates/variant-selection/ikas-config-snippet.json +13 -13
- package/data/section-templates/variant-selection/types.ts +2 -1
- package/data/storefront-api.json +12 -1
- package/data/storefront-types.json +1 -1
- package/dist/index.js +2 -355
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/data/migration-examples/complex-header-migration/_meta.json +0 -4
- package/data/migration-examples/complex-header-migration/after-config-snippet.json +0 -55
- package/data/migration-examples/complex-header-migration/after-section.tsx +0 -64
- package/data/migration-examples/complex-header-migration/before-props-summary.json +0 -42
- package/data/migration-examples/custom-dynamic-list-to-component-list/_meta.json +0 -4
- package/data/migration-examples/custom-dynamic-list-to-component-list/after-child-styles.css +0 -38
- package/data/migration-examples/custom-dynamic-list-to-component-list/after-child.tsx +0 -22
- package/data/migration-examples/custom-dynamic-list-to-component-list/after-config-snippet.json +0 -31
- package/data/migration-examples/custom-dynamic-list-to-component-list/after-section-styles.css +0 -25
- package/data/migration-examples/custom-dynamic-list-to-component-list/after-section.tsx +0 -17
- package/data/migration-examples/custom-dynamic-list-to-component-list/before-component.tsx +0 -32
- package/data/migration-examples/custom-dynamic-list-to-component-list/before-theme-snippet.json +0 -53
- package/data/migration-examples/full-component-with-tailwind/_meta.json +0 -4
- package/data/migration-examples/full-component-with-tailwind/after-component.tsx +0 -43
- package/data/migration-examples/full-component-with-tailwind/after-config-snippet.json +0 -25
- package/data/migration-examples/full-component-with-tailwind/after-styles.css +0 -99
- package/data/migration-examples/full-component-with-tailwind/before-component.tsx +0 -60
- package/data/migration-examples/object-custom-to-inline-props/_meta.json +0 -4
- package/data/migration-examples/object-custom-to-inline-props/after-component.tsx +0 -34
- package/data/migration-examples/object-custom-to-inline-props/after-config-snippet.json +0 -23
- package/data/migration-examples/object-custom-to-inline-props/after-styles.css +0 -38
- package/data/migration-examples/object-custom-to-inline-props/before-component.tsx +0 -30
- package/data/migration-examples/object-custom-to-inline-props/before-theme-snippet.json +0 -26
- package/data/migration-examples/slider-library-replacement/_meta.json +0 -4
- package/data/migration-examples/slider-library-replacement/after-child.tsx +0 -13
- package/data/migration-examples/slider-library-replacement/after-config-snippet.json +0 -29
- package/data/migration-examples/slider-library-replacement/after-section.tsx +0 -38
- package/data/migration-examples/slider-library-replacement/after-styles.css +0 -43
- package/data/migration-examples/slider-library-replacement/before-component.tsx +0 -39
- package/data/migration-examples/slider-library-replacement/before-types-snippet.ts +0 -14
- package/data/migration.json +0 -65
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"components": [
|
|
3
|
-
{
|
|
4
|
-
"id": "my-theme-header",
|
|
5
|
-
"name": "HeaderSection",
|
|
6
|
-
"type": "section",
|
|
7
|
-
"isHeader": true,
|
|
8
|
-
"entry": "./src/components/HeaderSection/index.tsx",
|
|
9
|
-
"styles": "./src/components/HeaderSection/styles.css",
|
|
10
|
-
"props": [
|
|
11
|
-
{ "name": "logo", "displayName": "Logo", "type": "IMAGE", "required": true },
|
|
12
|
-
{ "name": "logoWidth", "displayName": "Logo Width (px)", "type": "NUMBER", "required": false, "defaultValue": 120 },
|
|
13
|
-
{ "name": "mobileLogoWidth", "displayName": "Mobile Logo Width (px)", "type": "NUMBER", "required": false, "defaultValue": 80 },
|
|
14
|
-
{ "name": "menuLinks", "displayName": "Menu Links", "type": "COMPONENT_LIST", "required": false, "filteredComponentIds": ["my-theme-menu-link"] },
|
|
15
|
-
{ "name": "rightIcons", "displayName": "Right Icons", "type": "COMPONENT_LIST", "required": false, "filteredComponentIds": ["my-theme-icon-link"] },
|
|
16
|
-
{ "name": "announcement", "displayName": "Announcement", "type": "TEXT", "required": false },
|
|
17
|
-
{ "name": "announcementLink", "displayName": "Announcement Link", "type": "LINK", "required": false },
|
|
18
|
-
{ "name": "announcementBg", "displayName": "Announcement Background", "type": "COLOR", "required": false },
|
|
19
|
-
{ "name": "searchPlaceholder", "displayName": "Search Placeholder", "type": "TEXT", "required": false, "defaultValue": "Search..." },
|
|
20
|
-
{ "name": "navBackground", "displayName": "Nav Background", "type": "COLOR", "required": false },
|
|
21
|
-
{ "name": "stickyNav", "displayName": "Sticky Navigation", "type": "BOOLEAN", "required": false, "defaultValue": true },
|
|
22
|
-
{ "name": "searchProducts", "displayName": "Search Popular Products", "type": "PRODUCT_LIST", "required": false }
|
|
23
|
-
],
|
|
24
|
-
"propGroups": [
|
|
25
|
-
{ "id": "appearance", "name": "Appearance" },
|
|
26
|
-
{ "id": "search", "name": "Search" }
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"id": "my-theme-menu-link",
|
|
31
|
-
"name": "MenuLink",
|
|
32
|
-
"type": "component",
|
|
33
|
-
"entry": "./src/components/MenuLink/index.tsx",
|
|
34
|
-
"styles": "./src/components/MenuLink/styles.css",
|
|
35
|
-
"props": [
|
|
36
|
-
{ "name": "link", "displayName": "Link", "type": "LINK", "required": true },
|
|
37
|
-
{ "name": "icon", "displayName": "Icon", "type": "IMAGE", "required": false },
|
|
38
|
-
{ "name": "color", "displayName": "Text Color", "type": "COLOR", "required": false },
|
|
39
|
-
{ "name": "subLinks", "displayName": "Sub Links", "type": "LIST_OF_LINK", "required": false }
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"id": "my-theme-icon-link",
|
|
44
|
-
"name": "IconLink",
|
|
45
|
-
"type": "component",
|
|
46
|
-
"entry": "./src/components/IconLink/index.tsx",
|
|
47
|
-
"styles": "./src/components/IconLink/styles.css",
|
|
48
|
-
"props": [
|
|
49
|
-
{ "name": "image", "displayName": "Icon Image", "type": "IMAGE", "required": true },
|
|
50
|
-
{ "name": "link", "displayName": "Link", "type": "LINK", "required": true },
|
|
51
|
-
{ "name": "aspectRatio", "displayName": "Aspect Ratio", "type": "TEXT", "required": false, "defaultValue": "1/1" }
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useState } from "preact/hooks";
|
|
2
|
-
import { getDefaultSrc, IkasComponentRenderer } from "@ikas/bp-storefront";
|
|
3
|
-
import { Props } from "./types";
|
|
4
|
-
|
|
5
|
-
export default function HeaderSection({
|
|
6
|
-
logo,
|
|
7
|
-
logoWidth,
|
|
8
|
-
mobileLogoWidth,
|
|
9
|
-
menuLinks,
|
|
10
|
-
rightIcons,
|
|
11
|
-
announcement,
|
|
12
|
-
announcementLink,
|
|
13
|
-
announcementBg,
|
|
14
|
-
searchPlaceholder,
|
|
15
|
-
navBackground,
|
|
16
|
-
stickyNav,
|
|
17
|
-
...props
|
|
18
|
-
}: Props) {
|
|
19
|
-
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<header className={`header ${stickyNav ? "header--sticky" : ""}`}>
|
|
23
|
-
{announcement && (
|
|
24
|
-
<div className="announcement-bar" style={{ backgroundColor: announcementBg || "#000" }}>
|
|
25
|
-
{announcementLink ? (
|
|
26
|
-
<a href={announcementLink.href} className="announcement-link">{announcement}</a>
|
|
27
|
-
) : (
|
|
28
|
-
<span>{announcement}</span>
|
|
29
|
-
)}
|
|
30
|
-
</div>
|
|
31
|
-
)}
|
|
32
|
-
|
|
33
|
-
<nav className="nav-bar" style={{ backgroundColor: navBackground || "#fff" }}>
|
|
34
|
-
<div className="nav-inner">
|
|
35
|
-
<button className="mobile-menu-btn" onClick={() => setMobileMenuOpen(!mobileMenuOpen)}>
|
|
36
|
-
<span className="hamburger-icon" />
|
|
37
|
-
</button>
|
|
38
|
-
|
|
39
|
-
{logo && (
|
|
40
|
-
<a href="/" className="logo-link" style={{ "--logo-w": `${logoWidth || 120}px`, "--logo-mw": `${mobileLogoWidth || 80}px` }}>
|
|
41
|
-
<img src={getDefaultSrc(logo)} alt="Logo" className="logo-image" />
|
|
42
|
-
</a>
|
|
43
|
-
)}
|
|
44
|
-
|
|
45
|
-
<div className="menu-links">
|
|
46
|
-
<IkasComponentRenderer id="menu-links" components={menuLinks as any[]} parentProps={props} />
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<div className="right-icons">
|
|
50
|
-
<IkasComponentRenderer id="right-icons" components={rightIcons as any[]} parentProps={props} />
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</nav>
|
|
54
|
-
|
|
55
|
-
{mobileMenuOpen && (
|
|
56
|
-
<div className="mobile-menu-overlay" onClick={() => setMobileMenuOpen(false)}>
|
|
57
|
-
<div className="mobile-menu" onClick={(e) => e.stopPropagation()}>
|
|
58
|
-
<IkasComponentRenderer id="mobile-menu-links" components={menuLinks as any[]} parentProps={props} />
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
)}
|
|
62
|
-
</header>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": "Navbar",
|
|
3
|
-
"displayName": "Navbar",
|
|
4
|
-
"isHeader": true,
|
|
5
|
-
"props": [
|
|
6
|
-
{ "name": "logo", "type": "IMAGE" },
|
|
7
|
-
{ "name": "logoWidth", "type": "SLIDER", "sliderData": { "min": 80, "max": 300 } },
|
|
8
|
-
{ "name": "mobLogoWidth", "type": "SLIDER", "sliderData": { "min": 0, "max": 200 } },
|
|
9
|
-
{ "name": "menuLinks", "type": "CUSTOM", "customDataRef": "MenLink (DYNAMIC_LIST)" },
|
|
10
|
-
{ "name": "extraRightLinks", "type": "CUSTOM", "customDataRef": "GrselveLinkObj (DYNAMIC_LIST)" },
|
|
11
|
-
{ "name": "announcement", "type": "TEXT" },
|
|
12
|
-
{ "name": "announcementLink", "type": "LINK" },
|
|
13
|
-
{ "name": "announcementBg", "type": "COLOR" },
|
|
14
|
-
{ "name": "searchPlaceholder", "type": "TEXT" },
|
|
15
|
-
{ "name": "showGold", "type": "BOOLEAN" },
|
|
16
|
-
{ "name": "navBg", "type": "COLOR" },
|
|
17
|
-
{ "name": "mobileMenuBg", "type": "COLOR" },
|
|
18
|
-
{ "name": "searchPopularProducts", "type": "PRODUCT_LIST", "groupId": "search-group" },
|
|
19
|
-
{ "name": "closeInMobile", "type": "BOOLEAN" },
|
|
20
|
-
{ "name": "stickyNav", "type": "BOOLEAN" }
|
|
21
|
-
],
|
|
22
|
-
"customDataSummary": {
|
|
23
|
-
"MenLink": {
|
|
24
|
-
"type": "DYNAMIC_LIST/OBJECT",
|
|
25
|
-
"fields": [
|
|
26
|
-
{ "key": "mainlink", "type": "LINK" },
|
|
27
|
-
{ "key": "icon", "type": "IMAGE" },
|
|
28
|
-
{ "key": "color", "type": "COLOR" },
|
|
29
|
-
{ "key": "images", "type": "DYNAMIC_LIST", "nestedType": "GrselObjesi (image + link + viewType)" },
|
|
30
|
-
{ "key": "sublinks", "type": "DYNAMIC_LIST", "nestedType": "AltLink (links + cols)" }
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
"GrselveLinkObj": {
|
|
34
|
-
"type": "DYNAMIC_LIST/OBJECT",
|
|
35
|
-
"fields": [
|
|
36
|
-
{ "key": "image", "type": "IMAGE" },
|
|
37
|
-
{ "key": "aspect", "type": "TEXT" },
|
|
38
|
-
{ "key": "link", "type": "LINK" }
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "CUSTOM (DYNAMIC_LIST) → COMPONENT_LIST + Child Component",
|
|
3
|
-
"description": "Converts an old component with a CUSTOM prop referencing a DYNAMIC_LIST customData into a section with COMPONENT_LIST prop and a separate child component. This is the most common migration pattern."
|
|
4
|
-
}
|
package/data/migration-examples/custom-dynamic-list-to-component-list/after-child-styles.css
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.store-card {
|
|
2
|
-
display: block;
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
border-radius: 0.5rem;
|
|
5
|
-
border: 1px solid #e5e5e5;
|
|
6
|
-
text-decoration: none;
|
|
7
|
-
color: inherit;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.store-image-wrapper {
|
|
11
|
-
aspect-ratio: 16/9;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.store-image {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
object-fit: cover;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.store-content {
|
|
22
|
-
padding: 1rem;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.store-title {
|
|
26
|
-
font-size: 1.125rem;
|
|
27
|
-
font-weight: 500;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.store-location {
|
|
31
|
-
font-size: 0.875rem;
|
|
32
|
-
color: #6b7280;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.store-phone {
|
|
36
|
-
margin-top: 0.25rem;
|
|
37
|
-
font-size: 0.875rem;
|
|
38
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { getDefaultSrc } from "@ikas/bp-storefront";
|
|
2
|
-
import { Props } from "./types";
|
|
3
|
-
|
|
4
|
-
export default function StoreCard({ title, location, district, phone, image, link }: Props) {
|
|
5
|
-
const Tag = link ? "a" : "div";
|
|
6
|
-
const linkProps = link ? { href: link.href } : {};
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<Tag {...linkProps} className="store-card">
|
|
10
|
-
{image && (
|
|
11
|
-
<div className="store-image-wrapper">
|
|
12
|
-
<img src={getDefaultSrc(image)} alt={title || ""} className="store-image" />
|
|
13
|
-
</div>
|
|
14
|
-
)}
|
|
15
|
-
<div className="store-content">
|
|
16
|
-
<h3 className="store-title">{title}</h3>
|
|
17
|
-
<p className="store-location">{location}{district ? `, ${district}` : ""}</p>
|
|
18
|
-
{phone && <p className="store-phone">{phone}</p>}
|
|
19
|
-
</div>
|
|
20
|
-
</Tag>
|
|
21
|
-
);
|
|
22
|
-
}
|
package/data/migration-examples/custom-dynamic-list-to-component-list/after-config-snippet.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"components": [
|
|
3
|
-
{
|
|
4
|
-
"id": "my-theme-stores-section",
|
|
5
|
-
"name": "StoresSection",
|
|
6
|
-
"type": "section",
|
|
7
|
-
"entry": "./src/components/StoresSection/index.tsx",
|
|
8
|
-
"styles": "./src/components/StoresSection/styles.css",
|
|
9
|
-
"props": [
|
|
10
|
-
{ "name": "heading", "displayName": "Heading", "type": "TEXT", "required": false },
|
|
11
|
-
{ "name": "columns", "displayName": "Columns", "type": "NUMBER", "required": false, "defaultValue": 3 },
|
|
12
|
-
{ "name": "stores", "displayName": "Stores", "type": "COMPONENT_LIST", "required": false, "filteredComponentIds": ["my-theme-store-card"] }
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"id": "my-theme-store-card",
|
|
17
|
-
"name": "StoreCard",
|
|
18
|
-
"type": "component",
|
|
19
|
-
"entry": "./src/components/StoreCard/index.tsx",
|
|
20
|
-
"styles": "./src/components/StoreCard/styles.css",
|
|
21
|
-
"props": [
|
|
22
|
-
{ "name": "title", "displayName": "Title", "type": "TEXT", "required": false },
|
|
23
|
-
{ "name": "location", "displayName": "Location", "type": "TEXT", "required": false },
|
|
24
|
-
{ "name": "district", "displayName": "District", "type": "TEXT", "required": false },
|
|
25
|
-
{ "name": "phone", "displayName": "Phone", "type": "TEXT", "required": false },
|
|
26
|
-
{ "name": "image", "displayName": "Image", "type": "IMAGE", "required": false },
|
|
27
|
-
{ "name": "link", "displayName": "Link", "type": "LINK", "required": false }
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
package/data/migration-examples/custom-dynamic-list-to-component-list/after-section-styles.css
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.stores-section {
|
|
2
|
-
max-width: 1700px;
|
|
3
|
-
margin: 2.5rem auto 0;
|
|
4
|
-
padding: 0 20px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@media (min-width: 1024px) {
|
|
8
|
-
.stores-section {
|
|
9
|
-
margin-top: 5rem;
|
|
10
|
-
padding: 0 60px;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.stores-heading {
|
|
15
|
-
margin-bottom: 1.5rem;
|
|
16
|
-
text-align: center;
|
|
17
|
-
font-size: 1.5rem;
|
|
18
|
-
font-weight: 600;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.stores-grid {
|
|
22
|
-
display: grid;
|
|
23
|
-
grid-template-columns: repeat(var(--cols, 3), 1fr);
|
|
24
|
-
gap: 1.5rem;
|
|
25
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { IkasComponentRenderer } from "@ikas/bp-storefront";
|
|
2
|
-
import { Props } from "./types";
|
|
3
|
-
|
|
4
|
-
export default function StoresSection({ heading, columns, stores, ...props }: Props) {
|
|
5
|
-
return (
|
|
6
|
-
<section className="stores-section" style={{ "--cols": columns || 3 }}>
|
|
7
|
-
{heading && <h2 className="stores-heading">{heading}</h2>}
|
|
8
|
-
<div className="stores-grid">
|
|
9
|
-
<IkasComponentRenderer
|
|
10
|
-
id="stores"
|
|
11
|
-
components={stores as any[]}
|
|
12
|
-
parentProps={props}
|
|
13
|
-
/>
|
|
14
|
-
</div>
|
|
15
|
-
</section>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Image } from '@ikas/storefront';
|
|
2
|
-
import { observer } from 'mobx-react-lite';
|
|
3
|
-
import { StoresPageProps } from '../__generated__/types';
|
|
4
|
-
|
|
5
|
-
const StoresPage = ({ heading, stores, columns }: StoresPageProps) => {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
style={{ '--cols': columns?.value || 3 } as React.CSSProperties}
|
|
9
|
-
className="wrapper mt-10 lg:mt-20"
|
|
10
|
-
>
|
|
11
|
-
{heading && <h2 className="mb-6 text-center text-2xl font-semibold">{heading}</h2>}
|
|
12
|
-
<div className="grid gap-6" style={{ gridTemplateColumns: `repeat(var(--cols), 1fr)` }}>
|
|
13
|
-
{stores.map((store, i) => (
|
|
14
|
-
<a key={i} href={store.link?.href} className="group overflow-hidden rounded-lg border">
|
|
15
|
-
{store.image && (
|
|
16
|
-
<div className="relative aspect-video">
|
|
17
|
-
<Image image={store.image} layout="fill" objectFit="cover" />
|
|
18
|
-
</div>
|
|
19
|
-
)}
|
|
20
|
-
<div className="p-4">
|
|
21
|
-
<h3 className="text-lg font-medium">{store.title}</h3>
|
|
22
|
-
<p className="text-sm text-gray-500">{store.location}, {store.district}</p>
|
|
23
|
-
<p className="mt-1 text-sm">{store.phone}</p>
|
|
24
|
-
</div>
|
|
25
|
-
</a>
|
|
26
|
-
))}
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default observer(StoresPage);
|
package/data/migration-examples/custom-dynamic-list-to-component-list/before-theme-snippet.json
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"components": [
|
|
3
|
-
{
|
|
4
|
-
"id": "stores-page",
|
|
5
|
-
"name": "StoresPage",
|
|
6
|
-
"displayName": "Stores Page",
|
|
7
|
-
"props": [
|
|
8
|
-
{
|
|
9
|
-
"key": "heading",
|
|
10
|
-
"type": "TEXT",
|
|
11
|
-
"displayName": "Heading"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"key": "stores",
|
|
15
|
-
"type": "CUSTOM",
|
|
16
|
-
"displayName": "Stores",
|
|
17
|
-
"customDataId": "cd_stores_list"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"key": "columns",
|
|
21
|
-
"type": "SLIDER",
|
|
22
|
-
"displayName": "Columns",
|
|
23
|
-
"sliderData": {
|
|
24
|
-
"min": 1,
|
|
25
|
-
"max": 4,
|
|
26
|
-
"defaultValue": 3
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"customData": [
|
|
33
|
-
{
|
|
34
|
-
"id": "cd_stores_list",
|
|
35
|
-
"name": "Mağazalarımız",
|
|
36
|
-
"type": "DYNAMIC_LIST",
|
|
37
|
-
"objectTypeId": "cd_store_object"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"id": "cd_store_object",
|
|
41
|
-
"name": "Maaza",
|
|
42
|
-
"type": "OBJECT",
|
|
43
|
-
"fields": [
|
|
44
|
-
{ "key": "title", "type": "TEXT", "displayName": "Title" },
|
|
45
|
-
{ "key": "location", "type": "TEXT", "displayName": "Location" },
|
|
46
|
-
{ "key": "district", "type": "TEXT", "displayName": "District" },
|
|
47
|
-
{ "key": "phone", "type": "TEXT", "displayName": "Phone" },
|
|
48
|
-
{ "key": "image", "type": "IMAGE", "displayName": "Image" },
|
|
49
|
-
{ "key": "link", "type": "LINK", "displayName": "Link" }
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { getDefaultSrc } from "@ikas/bp-storefront";
|
|
2
|
-
import { Props } from "./types";
|
|
3
|
-
|
|
4
|
-
export default function CTASection({
|
|
5
|
-
image,
|
|
6
|
-
aspectRatio,
|
|
7
|
-
title,
|
|
8
|
-
content,
|
|
9
|
-
marginTop,
|
|
10
|
-
mobileMarginTop,
|
|
11
|
-
reverseLayout,
|
|
12
|
-
backgroundColor,
|
|
13
|
-
miniImage,
|
|
14
|
-
miniImageAspect,
|
|
15
|
-
imageMaxWidth,
|
|
16
|
-
textMaxWidth,
|
|
17
|
-
}: Props) {
|
|
18
|
-
return (
|
|
19
|
-
<div className="cta-wrapper" style={{ backgroundColor: backgroundColor || "transparent" }}>
|
|
20
|
-
<div
|
|
21
|
-
className={`cta-grid ${reverseLayout ? "cta-grid--reversed" : ""}`}
|
|
22
|
-
style={{
|
|
23
|
-
"--mt": `${marginTop || 0}px`,
|
|
24
|
-
"--mt-mobile": `${mobileMarginTop || 0}px`,
|
|
25
|
-
}}
|
|
26
|
-
>
|
|
27
|
-
<div className="cta-image-col" style={{ aspectRatio: aspectRatio || "1/1", maxWidth: imageMaxWidth || "316px" }}>
|
|
28
|
-
{image && <img src={getDefaultSrc(image)} alt="" className="cta-image" />}
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<div className="cta-text-col" style={{ maxWidth: textMaxWidth || "600px" }}>
|
|
32
|
-
{miniImage && (
|
|
33
|
-
<div className="cta-mini-image" style={{ aspectRatio: miniImageAspect }}>
|
|
34
|
-
<img src={getDefaultSrc(miniImage)} alt="" className="cta-mini-img" />
|
|
35
|
-
</div>
|
|
36
|
-
)}
|
|
37
|
-
{title && <div className="cta-title" dangerouslySetInnerHTML={{ __html: title }} />}
|
|
38
|
-
{content && <div className="cta-content" dangerouslySetInnerHTML={{ __html: content }} />}
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"components": [
|
|
3
|
-
{
|
|
4
|
-
"id": "my-theme-cta-section",
|
|
5
|
-
"name": "CTASection",
|
|
6
|
-
"type": "section",
|
|
7
|
-
"entry": "./src/components/CTASection/index.tsx",
|
|
8
|
-
"styles": "./src/components/CTASection/styles.css",
|
|
9
|
-
"props": [
|
|
10
|
-
{ "name": "image", "displayName": "Image", "type": "IMAGE", "required": true },
|
|
11
|
-
{ "name": "aspectRatio", "displayName": "Image Aspect Ratio", "type": "TEXT", "required": false, "defaultValue": "1/1" },
|
|
12
|
-
{ "name": "title", "displayName": "Title (HTML)", "type": "RICH_TEXT", "required": false },
|
|
13
|
-
{ "name": "content", "displayName": "Content (HTML)", "type": "RICH_TEXT", "required": true },
|
|
14
|
-
{ "name": "marginTop", "displayName": "Margin Top (px)", "type": "NUMBER", "required": false, "defaultValue": 0 },
|
|
15
|
-
{ "name": "mobileMarginTop", "displayName": "Mobile Margin Top (px)", "type": "NUMBER", "required": false, "defaultValue": 0 },
|
|
16
|
-
{ "name": "reverseLayout", "displayName": "Reverse Image/Text", "type": "BOOLEAN", "required": false, "defaultValue": false },
|
|
17
|
-
{ "name": "backgroundColor", "displayName": "Background Color", "type": "COLOR", "required": false },
|
|
18
|
-
{ "name": "miniImage", "displayName": "Mini Image", "type": "IMAGE", "required": false },
|
|
19
|
-
{ "name": "miniImageAspect", "displayName": "Mini Image Aspect", "type": "TEXT", "required": false },
|
|
20
|
-
{ "name": "imageMaxWidth", "displayName": "Image Max Width", "type": "TEXT", "required": false, "defaultValue": "316px" },
|
|
21
|
-
{ "name": "textMaxWidth", "displayName": "Text Max Width", "type": "TEXT", "required": false, "defaultValue": "600px" }
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
.cta-wrapper {
|
|
2
|
-
width: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.cta-grid {
|
|
6
|
-
max-width: 1700px;
|
|
7
|
-
margin: var(--mt-mobile, 0) auto 0;
|
|
8
|
-
padding: 60px 20px 0;
|
|
9
|
-
display: grid;
|
|
10
|
-
grid-template-columns: 1fr;
|
|
11
|
-
align-items: center;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@media (min-width: 1024px) {
|
|
15
|
-
.cta-grid {
|
|
16
|
-
margin-top: var(--mt, 0);
|
|
17
|
-
padding: 0 60px;
|
|
18
|
-
grid-template-columns: 1fr 1fr;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.cta-grid--reversed .cta-image-col {
|
|
23
|
-
order: 2;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.cta-image-col {
|
|
27
|
-
position: relative;
|
|
28
|
-
width: 100%;
|
|
29
|
-
margin: 0 auto;
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@media (min-width: 1024px) {
|
|
34
|
-
.cta-image-col {
|
|
35
|
-
margin-top: 60px;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.cta-image {
|
|
40
|
-
width: 100%;
|
|
41
|
-
height: 100%;
|
|
42
|
-
object-fit: cover;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.cta-text-col {
|
|
46
|
-
margin: 0 auto;
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
align-items: center;
|
|
50
|
-
justify-content: center;
|
|
51
|
-
height: 100%;
|
|
52
|
-
padding: 0 1.5rem 1.5rem;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@media (min-width: 1280px) {
|
|
56
|
-
.cta-text-col {
|
|
57
|
-
padding: 2.5rem;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.cta-mini-image {
|
|
62
|
-
width: 188px;
|
|
63
|
-
margin-bottom: 30px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@media (min-width: 1024px) {
|
|
67
|
-
.cta-mini-image {
|
|
68
|
-
margin-bottom: 40px;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.cta-mini-img {
|
|
73
|
-
width: 100%;
|
|
74
|
-
height: 100%;
|
|
75
|
-
object-fit: contain;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.cta-title {
|
|
79
|
-
margin-bottom: 1rem;
|
|
80
|
-
text-align: center;
|
|
81
|
-
font-size: 20px;
|
|
82
|
-
font-weight: 300;
|
|
83
|
-
line-height: 1.2;
|
|
84
|
-
color: white;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@media (min-width: 1024px) {
|
|
88
|
-
.cta-title {
|
|
89
|
-
font-size: 30px;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.cta-content {
|
|
94
|
-
text-align: center;
|
|
95
|
-
font-size: 0.875rem;
|
|
96
|
-
font-weight: 300;
|
|
97
|
-
line-height: 1.2;
|
|
98
|
-
color: white;
|
|
99
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Image } from '@ikas/storefront';
|
|
2
|
-
import { observer } from 'mobx-react-lite';
|
|
3
|
-
import { CTAProps } from '../__generated__/types';
|
|
4
|
-
|
|
5
|
-
const CTA = ({
|
|
6
|
-
image,
|
|
7
|
-
aspect,
|
|
8
|
-
title,
|
|
9
|
-
content,
|
|
10
|
-
marginTop,
|
|
11
|
-
mobileMarginTop,
|
|
12
|
-
reverse,
|
|
13
|
-
bg,
|
|
14
|
-
miniImage,
|
|
15
|
-
miniImageAspect,
|
|
16
|
-
imageMaxWidth,
|
|
17
|
-
textMaxWidth,
|
|
18
|
-
}: CTAProps) => {
|
|
19
|
-
return (
|
|
20
|
-
<div style={{ backgroundColor: bg || 'transparent' }}>
|
|
21
|
-
<div
|
|
22
|
-
style={{
|
|
23
|
-
'--mth': `${marginTop?.value || 0}px`,
|
|
24
|
-
'--mthm': `${mobileMarginTop?.value || 0}px`,
|
|
25
|
-
} as React.CSSProperties}
|
|
26
|
-
className={`wrapper mt-[var(--mthm)] grid grid-cols-1 items-center max-lg:pt-[60px] lg:mt-[var(--mth)] lg:grid-cols-2`}
|
|
27
|
-
>
|
|
28
|
-
<div
|
|
29
|
-
style={{ aspectRatio: aspect, maxWidth: imageMaxWidth || '316px' }}
|
|
30
|
-
className={`relative m-auto w-full overflow-hidden lg:mt-[60px] ${reverse ? 'order-last' : ''}`}
|
|
31
|
-
>
|
|
32
|
-
<Image image={image} layout="fill" objectFit="cover" />
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div
|
|
36
|
-
style={{ maxWidth: textMaxWidth || '600px' }}
|
|
37
|
-
className="m-auto flex h-full flex-col items-center justify-center p-6 pt-0 xl:p-10"
|
|
38
|
-
>
|
|
39
|
-
{miniImage && (
|
|
40
|
-
<div style={{ aspectRatio: miniImageAspect }} className="relative mb-[30px] w-[188px] lg:mb-10">
|
|
41
|
-
<Image image={miniImage} layout="fill" objectFit="contain" sizes="200px" />
|
|
42
|
-
</div>
|
|
43
|
-
)}
|
|
44
|
-
{title && (
|
|
45
|
-
<div
|
|
46
|
-
className="prose mb-4 max-w-none text-center text-[20px] font-light !leading-tight text-white lg:text-[30px]"
|
|
47
|
-
dangerouslySetInnerHTML={{ __html: title }}
|
|
48
|
-
/>
|
|
49
|
-
)}
|
|
50
|
-
<div
|
|
51
|
-
className="prose prose-sm max-w-none text-center font-light !leading-tight text-white"
|
|
52
|
-
dangerouslySetInnerHTML={{ __html: content }}
|
|
53
|
-
/>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default observer(CTA);
|