@evenicanpm/storefront-core 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/api-manager/README.md +30 -22
- package/src/api-manager/datasources/e4/{e4-address.datasource.ts → address/e4-address.datasource.ts} +10 -10
- package/src/api-manager/datasources/e4/address/e4-address.remaps.ts +70 -0
- package/src/api-manager/datasources/e4/address/e4-address.translator.ts +98 -0
- package/src/api-manager/datasources/e4/{e4-cart.datasource.ts → cart/e4-cart.datasource.ts} +17 -16
- package/src/api-manager/datasources/e4/cart/e4-cart.remaps.ts +94 -0
- package/src/api-manager/datasources/e4/cart/e4-cart.translator.ts +23 -0
- package/src/api-manager/datasources/e4/categories/e4-categories.datasource.ts +38 -0
- package/src/api-manager/datasources/e4/categories/e4-categories.translator.ts +161 -0
- package/src/api-manager/datasources/e4/e4.datasource.ts +8 -39
- package/src/api-manager/datasources/e4/graphqlRequestSdk.ts +8427 -0
- package/src/api-manager/datasources/e4/{e4-order.datasource.ts → order/e4-order.datasource.ts} +3 -3
- package/src/api-manager/datasources/e4/order/e4-order.remaps.ts +101 -0
- package/src/api-manager/datasources/e4/{e4-organization.datasource.ts → organization/e4-organization.datasource.ts} +1 -1
- package/src/api-manager/datasources/e4/{e4-product.datasource.ts → product/e4-product.datasource.ts} +13 -11
- package/src/api-manager/datasources/e4/product/e4-product.remaps.ts +88 -0
- package/src/api-manager/datasources/e4/{e4.translator.ts → product/e4-product.translator.ts} +9 -329
- package/src/api-manager/datasources/e4/{e4-session.datasource.ts → session/e4-session.datasource.ts} +3 -3
- package/src/api-manager/datasources/e4/session/e4-session.translator.ts +18 -0
- package/src/api-manager/datasources/e4/user/e4-user.datasource.ts +13 -6
- package/src/api-manager/datasources/e4/user/e4-user.remaps.ts +49 -0
- package/src/api-manager/datasources/e4/user/e4-user.translator.ts +23 -2
- package/src/api-manager/datasources/e4/utils/unwrap-e4-variants.ts +1 -1
- package/src/api-manager/index.ts +11 -6
- package/src/api-manager/schemas/user.schema.ts +3 -1
- package/src/api-manager/services/cart/mutations/add-to-cart.ts +1 -1
- package/src/api-manager/services/cart/mutations/checkout.ts +1 -2
- package/src/api-manager/services/product/server/product.server.ts +4 -1
- package/src/api-manager/types/Datasource.ts +1 -5
- package/src/cms/blocks/BlockManager.tsx +67 -0
- package/src/cms/blocks/Components/BrandLogosScroller.tsx +72 -0
- package/src/cms/blocks/Components/CategoryCard.tsx +47 -0
- package/src/cms/blocks/Components/CategoryCarousel/index.tsx +60 -0
- package/src/cms/blocks/Components/FeaturePill.tsx +99 -0
- package/src/cms/blocks/Components/FeaturedCategories.tsx +41 -0
- package/src/cms/blocks/Components/FeaturedProducts.tsx +41 -0
- package/src/cms/blocks/Components/Footer/data/index.ts +32 -0
- package/src/cms/blocks/Components/Footer/index.tsx +88 -0
- package/src/cms/blocks/Components/Footer/interfaces.ts +37 -0
- package/src/cms/blocks/Components/Footer/sections/FooterAppStore.tsx +45 -0
- package/src/cms/blocks/Components/Footer/sections/FooterContact.tsx +36 -0
- package/src/cms/blocks/Components/Footer/sections/FooterLinks.tsx +30 -0
- package/src/cms/blocks/Components/Footer/sections/FooterLogo.tsx +26 -0
- package/src/cms/blocks/Components/Footer/sections/FooterSocialLinks.tsx +70 -0
- package/src/cms/blocks/Components/Footer/styles/index.ts +39 -0
- package/src/cms/blocks/Components/Footer.tsx +77 -0
- package/src/cms/blocks/Components/Hero.tsx +73 -0
- package/src/cms/blocks/Components/HeroCarousel/index.tsx +42 -0
- package/src/cms/blocks/Components/Image.tsx +39 -0
- package/src/cms/blocks/Components/MediaCard.tsx +41 -0
- package/src/cms/blocks/Components/ProductCarousel/index.tsx +82 -0
- package/src/cms/blocks/Components/ProductSectionFullWidth/index.tsx +103 -0
- package/src/cms/blocks/Components/RichText.tsx +19 -0
- package/src/cms/blocks/Components/Seo/index.tsx +48 -0
- package/src/cms/blocks/Components/Services/index.tsx +21 -0
- package/src/cms/blocks/Components/Services/service-card.tsx +73 -0
- package/src/cms/blocks/Components/shared/featured-product-card.tsx +29 -0
- package/src/cms/blocks/Components/shared/product-category-item.tsx +49 -0
- package/src/cms/blocks/Components/shared/product-grid.tsx +48 -0
- package/src/cms/blocks/Components/shared/top-categories-card.tsx +66 -0
- package/src/cms/blocks/Components/shared/top-rating-product-card.tsx +66 -0
- package/src/cms/blocks/Icons/Components/Category.tsx +14 -0
- package/src/cms/blocks/Icons/Components/DottedStar.tsx +40 -0
- package/src/cms/blocks/Icons/Components/FallbackIcon.tsx +33 -0
- package/src/cms/blocks/Icons/Components/GiftBox.tsx +18 -0
- package/src/cms/blocks/Icons/Components/Light.tsx +13 -0
- package/src/cms/blocks/Icons/Components/NewArrival.tsx +18 -0
- package/src/cms/blocks/Icons/Components/RankBadge.tsx +39 -0
- package/src/cms/blocks/Icons/index.ts +32 -0
- package/src/cms/blocks/index.tsx +16 -0
- package/src/cms/blocks/interfaces.ts +240 -0
- package/src/components/Notifications/README.md +1 -1
- package/src/components/Notifications/notification-context.tsx +1 -1
- package/src/components/README.md +3 -8
- package/src/components/_components/MiniCartClient.tsx +1 -1
- package/src/components/_components/navbar/category-based-menu/components/categories.tsx +1 -1
- package/src/components/_components/navbar/mega-menu/mega-menu.tsx +1 -1
- package/src/components/_components/navbar/nav-list/nav-item-child.tsx +2 -2
- package/src/components/_components/product-cards/product-card-1/product-card-1-wrapper.tsx +1 -1
- package/src/components/_components/products-view/product-view-dialog.tsx +1 -1
- package/src/components/_components/settings/setting.tsx +1 -1
- package/src/components/_components/wishlist/add-to-wishlist-dialog.tsx +1 -1
- package/src/components/_components/wishlist/components/create-new-list.tsx +1 -1
- package/src/components/_components/wishlist/remove-from-wishlist-dialog.tsx +1 -1
- package/src/components/_components/wishlist-modal/add-to-wishlist-dialog.tsx +1 -1
- package/src/components/_components/wishlist-modal/remove-from-wishlist-dialog.tsx +1 -1
- package/src/components/countries-input.tsx +0 -1
- package/src/components-v2/BazaarCard.tsx +21 -0
- package/src/components-v2/BazaarImage.tsx +12 -0
- package/src/components-v2/BazaarMenu.tsx +47 -0
- package/src/components-v2/BazaarSwitch.tsx +37 -0
- package/src/components-v2/BazaarTextField.tsx +73 -0
- package/src/components-v2/BoxShadowCard.tsx +16 -0
- package/src/components-v2/DropZone.tsx +86 -0
- package/src/components-v2/HoverBox.tsx +22 -0
- package/src/components-v2/Image.tsx +5 -0
- package/src/components-v2/ImageWithFallback.tsx +51 -0
- package/src/components-v2/LazyImage.tsx +12 -0
- package/src/components-v2/Loading.tsx +36 -0
- package/src/components-v2/MiniCartClient.tsx +65 -0
- package/src/components-v2/README.md +4 -0
- package/src/components-v2/SearchInput.tsx +28 -0
- package/src/components-v2/SnackbarProvider.tsx +32 -0
- package/src/components-v2/T/index.tsx +15 -0
- package/src/components-v2/Typography.tsx +227 -0
- package/src/components-v2/WhiteButton.tsx +20 -0
- package/src/components-v2/accordion/accordion-header.tsx +43 -0
- package/src/components-v2/accordion/index.ts +1 -0
- package/src/components-v2/bazaar-types.ts +84 -0
- package/src/components-v2/carousel/carousel.tsx +72 -0
- package/src/components-v2/carousel/components/carousel-arrows.tsx +60 -0
- package/src/components-v2/carousel/components/carousel-dots.tsx +21 -0
- package/src/components-v2/carousel/index.ts +3 -0
- package/src/components-v2/carousel/styles/index.ts +93 -0
- package/src/components-v2/carousel-cards/carousel-card-1/carousel-card-1.tsx +64 -0
- package/src/components-v2/carousel-cards/carousel-card-1/index.ts +1 -0
- package/src/components-v2/carousel-cards/carousel-card-1/styles.ts +34 -0
- package/src/components-v2/carousel-cards/carousel-card-2/carousel-card-2.tsx +78 -0
- package/src/components-v2/carousel-cards/carousel-card-2/index.ts +1 -0
- package/src/components-v2/carousel-cards/carousel-card-2/styles.ts +26 -0
- package/src/components-v2/carousel-cards/carousel-card-3/carousel-card-3.tsx +37 -0
- package/src/components-v2/carousel-cards/carousel-card-3/index.ts +1 -0
- package/src/components-v2/carousel-cards/carousel-card-3/styles.ts +28 -0
- package/src/components-v2/carousel-cards/carousel-card-4/carousel-card-4.tsx +81 -0
- package/src/components-v2/carousel-cards/carousel-card-4/index.ts +1 -0
- package/src/components-v2/carousel-cards/carousel-card-4/styles.ts +27 -0
- package/src/components-v2/categories/category-list/category-list.tsx +59 -0
- package/src/components-v2/categories/category-list/index.ts +1 -0
- package/src/components-v2/categories/category-list/styles.ts +29 -0
- package/src/components-v2/categories/category-list/types.ts +4 -0
- package/src/components-v2/categories/category-list-item/category-menu-item.tsx +37 -0
- package/src/components-v2/categories/category-list-item/index.ts +1 -0
- package/src/components-v2/categories/category-list-item/styles.ts +35 -0
- package/src/components-v2/categories/category-menu.tsx +51 -0
- package/src/components-v2/categories/mega-menu/banner.tsx +60 -0
- package/src/components-v2/categories/mega-menu/column-list.tsx +70 -0
- package/src/components-v2/categories/mega-menu/mega-menu-1.tsx +37 -0
- package/src/components-v2/categories/mega-menu/mega-menu-2.tsx +37 -0
- package/src/components-v2/categories/mega-menu/styles.ts +25 -0
- package/src/components-v2/categories/types.ts +16 -0
- package/src/components-v2/category-cards/category-card-1/category-card-1.tsx +21 -0
- package/src/components-v2/category-cards/category-card-1/index.ts +1 -0
- package/src/components-v2/category-cards/category-card-1/styles.ts +37 -0
- package/src/components-v2/countdown/count-box.tsx +19 -0
- package/src/components-v2/countdown/count-down.tsx +24 -0
- package/src/components-v2/countdown/index.tsx +2 -0
- package/src/components-v2/countdown/useCountDown.ts +41 -0
- package/src/components-v2/countries-input.tsx +73 -0
- package/src/components-v2/data-table/index.ts +2 -0
- package/src/components-v2/data-table/table-header.tsx +91 -0
- package/src/components-v2/data-table/table-pagination.tsx +36 -0
- package/src/components-v2/flex-box/flex-between.tsx +14 -0
- package/src/components-v2/flex-box/flex-box.tsx +9 -0
- package/src/components-v2/flex-box/flex-row-center.tsx +9 -0
- package/src/components-v2/flex-box/index.ts +5 -0
- package/src/components-v2/footer/components/about-links.tsx +23 -0
- package/src/components-v2/footer/components/app-store.tsx +38 -0
- package/src/components-v2/footer/components/customer-care-links.tsx +21 -0
- package/src/components-v2/footer/components/logo.tsx +23 -0
- package/src/components-v2/footer/components/social-links.tsx +43 -0
- package/src/components-v2/footer/data/index.ts +54 -0
- package/src/components-v2/footer/footer-1.tsx +62 -0
- package/src/components-v2/footer/footer-2.tsx +57 -0
- package/src/components-v2/footer/footer-3.tsx +53 -0
- package/src/components-v2/footer/footer-4.tsx +71 -0
- package/src/components-v2/footer/index.ts +4 -0
- package/src/components-v2/footer/styles/index.ts +42 -0
- package/src/components-v2/header/components/categories-menu.tsx +23 -0
- package/src/components-v2/header/components/mobile-header.tsx +75 -0
- package/src/components-v2/header/components/user.test.tsx +200 -0
- package/src/components-v2/header/components/user.tsx +204 -0
- package/src/components-v2/header/header.tsx +63 -0
- package/src/components-v2/header/hooks/use-header.ts +13 -0
- package/src/components-v2/header/index.ts +1 -0
- package/src/components-v2/header/sticky-header.tsx +17 -0
- package/src/components-v2/header/styles/index.ts +24 -0
- package/src/components-v2/icons/cart-bag.tsx +13 -0
- package/src/components-v2/icons/category-outline.tsx +29 -0
- package/src/components-v2/icons/category.tsx +12 -0
- package/src/components-v2/icons/home.tsx +19 -0
- package/src/components-v2/icons/search.tsx +13 -0
- package/src/components-v2/icons/shopping-bag-outlined.tsx +13 -0
- package/src/components-v2/icons/up-down.tsx +21 -0
- package/src/components-v2/icons/user.tsx +13 -0
- package/src/components-v2/icons/user2.tsx +14 -0
- package/src/components-v2/mini-cart/__tests__/cart-item.test.tsx +174 -0
- package/src/components-v2/mini-cart/__tests__/mini-cart.test.tsx +121 -0
- package/src/components-v2/mini-cart/__tests__/test-cart-empty.json +84 -0
- package/src/components-v2/mini-cart/__tests__/test-cart-with-item.json +244 -0
- package/src/components-v2/mini-cart/components/bottom-actions.tsx +27 -0
- package/src/components-v2/mini-cart/components/cart-item.tsx +147 -0
- package/src/components-v2/mini-cart/components/empty-view.tsx +29 -0
- package/src/components-v2/mini-cart/components/top-header.tsx +37 -0
- package/src/components-v2/mini-cart/index.ts +1 -0
- package/src/components-v2/mini-cart/mini-cart.tsx +107 -0
- package/src/components-v2/mobile-navigation/index.ts +3 -0
- package/src/components-v2/mobile-navigation/mobile-navigation-bar.tsx +73 -0
- package/src/components-v2/mobile-navigation/styles/index.ts +63 -0
- package/src/components-v2/nav-link/index.ts +5 -0
- package/src/components-v2/nav-link/nav-link-2.tsx +32 -0
- package/src/components-v2/nav-link/nav-link-3.tsx +67 -0
- package/src/components-v2/nav-link/nav-link.tsx +53 -0
- package/src/components-v2/navbar/categories.tsx +27 -0
- package/src/components-v2/navbar/category-based-menu/category-based-menu.tsx +52 -0
- package/src/components-v2/navbar/category-based-menu/components/categories.tsx +44 -0
- package/src/components-v2/navbar/category-based-menu/components/category-item.tsx +31 -0
- package/src/components-v2/navbar/category-based-menu/components/child-categories.tsx +38 -0
- package/src/components-v2/navbar/category-based-menu/index.ts +1 -0
- package/src/components-v2/navbar/category-based-menu/styles.ts +81 -0
- package/src/components-v2/navbar/category-based-menu/types.ts +18 -0
- package/src/components-v2/navbar/index.ts +1 -0
- package/src/components-v2/navbar/mega-menu/category-list.tsx +29 -0
- package/src/components-v2/navbar/mega-menu/index.ts +1 -0
- package/src/components-v2/navbar/mega-menu/mega-menu.tsx +71 -0
- package/src/components-v2/navbar/mega-menu/styles.ts +43 -0
- package/src/components-v2/navbar/mobile-menu/index.ts +1 -0
- package/src/components-v2/navbar/mobile-menu/mobile-menu.tsx +70 -0
- package/src/components-v2/navbar/mobile-menu/render-levels.test.tsx +71 -0
- package/src/components-v2/navbar/mobile-menu/render-levels.tsx +62 -0
- package/src/components-v2/navbar/nav-list/cms-nav.test.tsx +84 -0
- package/src/components-v2/navbar/nav-list/index.ts +1 -0
- package/src/components-v2/navbar/nav-list/nav-item-child.tsx +66 -0
- package/src/components-v2/navbar/nav-list/nav-list.tsx +119 -0
- package/src/components-v2/navbar/navbar.tsx +43 -0
- package/src/components-v2/navbar/styles.ts +90 -0
- package/src/components-v2/navbar/utils/transform-nav.test.ts +209 -0
- package/src/components-v2/navbar/utils/transform-nav.ts +43 -0
- package/src/components-v2/newsletter/index.ts +1 -0
- package/src/components-v2/newsletter/newsletter.tsx +112 -0
- package/src/components-v2/newsletter/social-icons.tsx +35 -0
- package/src/components-v2/newsletter/styles.ts +65 -0
- package/src/components-v2/page-sidenav/grocery-side-nav/components/link-item.tsx +21 -0
- package/src/components-v2/page-sidenav/grocery-side-nav/components/list-item.tsx +27 -0
- package/src/components-v2/page-sidenav/grocery-side-nav/components/nav-accordion.tsx +36 -0
- package/src/components-v2/page-sidenav/grocery-side-nav/components/render-child.tsx +26 -0
- package/src/components-v2/page-sidenav/grocery-side-nav/grocery-side-nav.tsx +32 -0
- package/src/components-v2/page-sidenav/grocery-side-nav/index.ts +1 -0
- package/src/components-v2/page-sidenav/grocery-side-nav/styles/index.ts +11 -0
- package/src/components-v2/page-sidenav/health-beauty-side-nav/components/list-item.tsx +27 -0
- package/src/components-v2/page-sidenav/health-beauty-side-nav/components/nav-accordion.tsx +44 -0
- package/src/components-v2/page-sidenav/health-beauty-side-nav/components/render-child.tsx +20 -0
- package/src/components-v2/page-sidenav/health-beauty-side-nav/health-beauty-side-nav.tsx +43 -0
- package/src/components-v2/page-sidenav/health-beauty-side-nav/index.ts +1 -0
- package/src/components-v2/page-sidenav/health-beauty-side-nav/styles/index.ts +27 -0
- package/src/components-v2/page-sidenav/side-navbar/components/list-item.tsx +25 -0
- package/src/components-v2/page-sidenav/side-navbar/components/nav-accordion.tsx +46 -0
- package/src/components-v2/page-sidenav/side-navbar/components/render-child.tsx +20 -0
- package/src/components-v2/page-sidenav/side-navbar/index.ts +1 -0
- package/src/components-v2/page-sidenav/side-navbar/side-nav-bar.tsx +77 -0
- package/src/components-v2/page-sidenav/side-navbar/styles/index.ts +73 -0
- package/src/components-v2/page-sidenav/side-navbar-2/components/button-content.tsx +32 -0
- package/src/components-v2/page-sidenav/side-navbar-2/components/sidebar-accordion.tsx +66 -0
- package/src/components-v2/page-sidenav/side-navbar-2/index.ts +1 -0
- package/src/components-v2/page-sidenav/side-navbar-2/side-navbar-2.tsx +63 -0
- package/src/components-v2/page-sidenav/side-navbar-2/styles/index.ts +68 -0
- package/src/components-v2/product-cards/discount-chip.tsx +43 -0
- package/src/components-v2/product-cards/product-card-1/components/hover-actions.tsx +37 -0
- package/src/components-v2/product-cards/product-card-1/components/quantity-buttons.tsx +65 -0
- package/src/components-v2/product-cards/product-card-1/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-1/product-card-1-wrapper.tsx +304 -0
- package/src/components-v2/product-cards/product-card-1/product-card.tsx +107 -0
- package/src/components-v2/product-cards/product-card-1/styles/index.ts +46 -0
- package/src/components-v2/product-cards/product-card-10/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-10/product-card.tsx +128 -0
- package/src/components-v2/product-cards/product-card-10/styles/index.ts +38 -0
- package/src/components-v2/product-cards/product-card-11/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-11/product-card.tsx +66 -0
- package/src/components-v2/product-cards/product-card-11/styles/index.ts +16 -0
- package/src/components-v2/product-cards/product-card-12/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-12/product-card.tsx +42 -0
- package/src/components-v2/product-cards/product-card-12/styles/index.ts +16 -0
- package/src/components-v2/product-cards/product-card-13/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-13/product-card.tsx +48 -0
- package/src/components-v2/product-cards/product-card-13/styles/index.ts +25 -0
- package/src/components-v2/product-cards/product-card-14/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-14/product-card.tsx +125 -0
- package/src/components-v2/product-cards/product-card-14/styles/index.ts +40 -0
- package/src/components-v2/product-cards/product-card-15/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-15/product-card.tsx +121 -0
- package/src/components-v2/product-cards/product-card-15/styles/index.ts +57 -0
- package/src/components-v2/product-cards/product-card-16/components/quantity-buttons.tsx +54 -0
- package/src/components-v2/product-cards/product-card-16/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-16/product-card.tsx +116 -0
- package/src/components-v2/product-cards/product-card-16/styles/index.ts +18 -0
- package/src/components-v2/product-cards/product-card-2/components/favorite-button.tsx +29 -0
- package/src/components-v2/product-cards/product-card-2/components/product-price.tsx +26 -0
- package/src/components-v2/product-cards/product-card-2/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-2/product-card.tsx +70 -0
- package/src/components-v2/product-cards/product-card-3/components/hover-actions.tsx +83 -0
- package/src/components-v2/product-cards/product-card-3/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-3/product-card.tsx +110 -0
- package/src/components-v2/product-cards/product-card-3/styles/index.ts +89 -0
- package/src/components-v2/product-cards/product-card-4/components/hover-actions.tsx +50 -0
- package/src/components-v2/product-cards/product-card-4/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-4/product-card.tsx +128 -0
- package/src/components-v2/product-cards/product-card-4/styles/index.ts +66 -0
- package/src/components-v2/product-cards/product-card-5/components/button-actions.tsx +49 -0
- package/src/components-v2/product-cards/product-card-5/components/hover-actions.tsx +50 -0
- package/src/components-v2/product-cards/product-card-5/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-5/product-card.tsx +137 -0
- package/src/components-v2/product-cards/product-card-5/styles/index.ts +94 -0
- package/src/components-v2/product-cards/product-card-6/components/hover-actions.tsx +50 -0
- package/src/components-v2/product-cards/product-card-6/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-6/product-card.tsx +121 -0
- package/src/components-v2/product-cards/product-card-6/styles/index.ts +63 -0
- package/src/components-v2/product-cards/product-card-7/components/product-status.tsx +18 -0
- package/src/components-v2/product-cards/product-card-7/components/quantity-buttons.tsx +47 -0
- package/src/components-v2/product-cards/product-card-7/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-7/product-card.tsx +139 -0
- package/src/components-v2/product-cards/product-card-7/styles/index.ts +98 -0
- package/src/components-v2/product-cards/product-card-8/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-8/product-card.tsx +151 -0
- package/src/components-v2/product-cards/product-card-8/styles/index.ts +61 -0
- package/src/components-v2/product-cards/product-card-9/components/add-to-cart.tsx +63 -0
- package/src/components-v2/product-cards/product-card-9/components/favorite-button.tsx +27 -0
- package/src/components-v2/product-cards/product-card-9/components/tags.tsx +33 -0
- package/src/components-v2/product-cards/product-card-9/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-9/product-card.tsx +169 -0
- package/src/components-v2/product-cards/product-card-wishlist/components/hover-actions.tsx +37 -0
- package/src/components-v2/product-cards/product-card-wishlist/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-wishlist/product-card.tsx +118 -0
- package/src/components-v2/product-cards/product-card-wishlist/styles/index.ts +53 -0
- package/src/components-v2/product-cards/product-price.tsx +26 -0
- package/src/components-v2/product-cards/product-rating.tsx +28 -0
- package/src/components-v2/product-cards/product-title.tsx +24 -0
- package/src/components-v2/product-cards/use-product.ts +35 -0
- package/src/components-v2/product-dimensions/components/dimensions-group-error.tsx +46 -0
- package/src/components-v2/product-dimensions/components/dimensions-group-label.tsx +27 -0
- package/src/components-v2/product-dimensions/components/dimensions-group-list-chip.tsx +78 -0
- package/src/components-v2/product-dimensions/components/dimensions-group-list.tsx +24 -0
- package/src/components-v2/product-dimensions/components/dimensions-group.tsx +55 -0
- package/src/components-v2/product-dimensions/components/dimensions.tsx +84 -0
- package/src/components-v2/product-dimensions/index.tsx +38 -0
- package/src/components-v2/product-dimensions/utils/has-selected-dimension.ts +20 -0
- package/src/components-v2/product-quantity-buttons/product-quantity-buttons.tsx +88 -0
- package/src/components-v2/products-view/product-view-dialog.tsx +218 -0
- package/src/components-v2/products-view/products-grid-view.tsx +52 -0
- package/src/components-v2/products-view/products-list-view.tsx +49 -0
- package/src/components-v2/progress/index.ts +1 -0
- package/src/components-v2/progress/progress.tsx +77 -0
- package/src/components-v2/scrollbar/index.ts +1 -0
- package/src/components-v2/scrollbar/scrollbar.tsx +27 -0
- package/src/components-v2/scrollbar/styles.ts +15 -0
- package/src/components-v2/search-box/__test__/search-input-category.test.tsx +110 -0
- package/src/components-v2/search-box/__test__/search-input.test.tsx +137 -0
- package/src/components-v2/search-box/__test__/search-results.json +165 -0
- package/src/components-v2/search-box/components/category-dropdown.tsx +61 -0
- package/src/components-v2/search-box/components/search-result.tsx +86 -0
- package/src/components-v2/search-box/hooks/use-search.ts +63 -0
- package/src/components-v2/search-box/index.ts +2 -0
- package/src/components-v2/search-box/search-input-category.test.tsx +110 -0
- package/src/components-v2/search-box/search-input-category.tsx +203 -0
- package/src/components-v2/search-box/search-input.test.tsx +41 -0
- package/src/components-v2/search-box/search-input.tsx +66 -0
- package/src/components-v2/search-box/styles/index.ts +47 -0
- package/src/components-v2/section-header/index.ts +2 -0
- package/src/components-v2/section-header/section-creator.tsx +29 -0
- package/src/components-v2/section-header/section-header.tsx +44 -0
- package/src/components-v2/service-cards/icon-component.tsx +18 -0
- package/src/components-v2/service-cards/service-card-1/index.ts +1 -0
- package/src/components-v2/service-cards/service-card-1/service-card-1.tsx +42 -0
- package/src/components-v2/service-cards/service-card-2/index.ts +1 -0
- package/src/components-v2/service-cards/service-card-2/service-card-2.tsx +37 -0
- package/src/components-v2/service-cards/service-card-3/index.ts +1 -0
- package/src/components-v2/service-cards/service-card-3/service-card-3.tsx +28 -0
- package/src/components-v2/service-cards/service-card-3/styles.ts +23 -0
- package/src/components-v2/settings/index.ts +1 -0
- package/src/components-v2/settings/setting.tsx +141 -0
- package/src/components-v2/settings/styles.ts +57 -0
- package/src/components-v2/shop-card/index.ts +1 -0
- package/src/components-v2/shop-card/shop-card.tsx +152 -0
- package/src/components-v2/shop-card/styles.ts +33 -0
- package/src/components-v2/side-nav/index.ts +1 -0
- package/src/components-v2/side-nav/side-nav.tsx +49 -0
- package/src/components-v2/site-logo.tsx +17 -0
- package/src/components-v2/sticky/Sticky.tsx +62 -0
- package/src/components-v2/sticky/index.ts +1 -0
- package/src/components-v2/sticky/styles.ts +38 -0
- package/src/components-v2/sticky-wrapper/index.ts +1 -0
- package/src/components-v2/sticky-wrapper/sticky-wrapper.tsx +21 -0
- package/src/components-v2/sticky-wrapper/styles.ts +25 -0
- package/src/components-v2/stories/story-content/index.ts +1 -0
- package/src/components-v2/stories/story-content/story-content.tsx +28 -0
- package/src/components-v2/stories/story-content/styles.ts +22 -0
- package/src/components-v2/stories/story-item/index.ts +1 -0
- package/src/components-v2/stories/story-item/story-item.tsx +24 -0
- package/src/components-v2/stories/story-item/styles.ts +11 -0
- package/src/components-v2/stories/story-viewer/index.ts +1 -0
- package/src/components-v2/stories/story-viewer/story-viewer.tsx +44 -0
- package/src/components-v2/stories/story-viewer/styles.ts +15 -0
- package/src/components-v2/subscribe-input/index.ts +1 -0
- package/src/components-v2/subscribe-input/styles.ts +14 -0
- package/src/components-v2/subscribe-input/subscribe-input.tsx +43 -0
- package/src/components-v2/topbar/index.ts +1 -0
- package/src/components-v2/topbar/styles.ts +55 -0
- package/src/components-v2/topbar/top-bar.tsx +115 -0
- package/src/components-v2/utils/constants.ts +8 -0
- package/src/components-v2/wishlist/add-to-wishlist-dialog.tsx +161 -0
- package/src/components-v2/wishlist/components/create-new-list.tsx +167 -0
- package/src/components-v2/wishlist/components/create-wishlist-button.tsx +40 -0
- package/src/components-v2/wishlist/components/dashboard-header.tsx +123 -0
- package/src/components-v2/wishlist/components/navigation.tsx +87 -0
- package/src/components-v2/wishlist/components/no-records.tsx +20 -0
- package/src/components-v2/wishlist/components/wishlist-modal-item.tsx +66 -0
- package/src/components-v2/wishlist/remove-from-wishlist-dialog.tsx +175 -0
- package/src/components-v2/wishlist/styles.ts +61 -0
- package/src/components-v2/wishlist-modal/TODO.md +10 -0
- package/src/components-v2/wishlist-modal/add-to-wishlist-button.tsx +69 -0
- package/src/components-v2/wishlist-modal/add-to-wishlist-dialog.tsx +161 -0
- package/src/components-v2/wishlist-modal/remove-from-wishlist-dialog.tsx +174 -0
- package/src/components-v2/wishlist-modal/wishlist-modal-item.tsx +65 -0
- package/src/pages/README.md +4 -0
- package/src/pages/product-details/product-intro/product-intro.tsx +3 -1
- package/src/pages/product-list/quick-view-dialog-content.tsx +4 -2
- package/src/pages-v2/README.md +4 -0
- package/src/pages-v2/account/addresses/address-form.tsx +289 -0
- package/src/pages-v2/account/addresses/address-item.tsx +104 -0
- package/src/pages-v2/account/dashboard-header.tsx +123 -0
- package/src/pages-v2/account/navigation.tsx +87 -0
- package/src/pages-v2/account/no-records.tsx +20 -0
- package/src/pages-v2/account/orders/icons/delivery.tsx +14 -0
- package/src/pages-v2/account/orders/icons/package-box.tsx +13 -0
- package/src/pages-v2/account/orders/icons/truck-filled.tsx +14 -0
- package/src/pages-v2/account/orders/order-progress.tsx +114 -0
- package/src/pages-v2/account/orders/order-row.tsx +64 -0
- package/src/pages-v2/account/orders/order-summary.tsx +87 -0
- package/src/pages-v2/account/orders/ordered-products.tsx +121 -0
- package/src/pages-v2/account/profile/profile-button.test.tsx +59 -0
- package/src/pages-v2/account/profile/profile-button.tsx +50 -0
- package/src/pages-v2/account/profile/user-info.tsx +62 -0
- package/src/pages-v2/account/styles.ts +32 -0
- package/src/pages-v2/account/table-row.tsx +19 -0
- package/src/pages-v2/account/wishlist/create-new-list.tsx +167 -0
- package/src/pages-v2/account/wishlist/create-wishlist-button.tsx +40 -0
- package/src/pages-v2/account/wishlist/wishlist-item.tsx +82 -0
- package/src/pages-v2/blog/pagination.tsx +38 -0
- package/src/pages-v2/cart/cart-item.tsx +312 -0
- package/src/pages-v2/cart/checkout-form.tsx +122 -0
- package/src/pages-v2/cart/coupon-entry.tsx +90 -0
- package/src/pages-v2/cart/estimate-shipping.tsx +183 -0
- package/src/pages-v2/cart/wrapper.tsx +30 -0
- package/src/pages-v2/checkout/checkout-alt-form/address-card.tsx +76 -0
- package/src/pages-v2/checkout/checkout-alt-form/checkout-form.tsx +131 -0
- package/src/pages-v2/checkout/checkout-alt-form/checkout-step.tsx +120 -0
- package/src/pages-v2/checkout/checkout-alt-form/customer-information.tsx +94 -0
- package/src/pages-v2/checkout/checkout-alt-form/delivery-address.tsx +174 -0
- package/src/pages-v2/checkout/checkout-alt-form/delivery-date.tsx +114 -0
- package/src/pages-v2/checkout/checkout-alt-form/delivery-options.tsx +190 -0
- package/src/pages-v2/checkout/checkout-alt-form/edit-address-form.tsx +130 -0
- package/src/pages-v2/checkout/checkout-alt-form/heading.tsx +50 -0
- package/src/pages-v2/checkout/checkout-alt-form/index.ts +1 -0
- package/src/pages-v2/checkout/checkout-alt-form/new-address-form.tsx +299 -0
- package/src/pages-v2/checkout/checkout-alt-form/node.tsx +9 -0
- package/src/pages-v2/checkout/checkout-alt-form/payment-details.tsx +347 -0
- package/src/pages-v2/checkout/checkout-alt-form/safe-card-preview-data.tsx +36 -0
- package/src/pages-v2/checkout/checkout-alt-form/types.ts +20 -0
- package/src/pages-v2/checkout/checkout-alt-summary/cart-item.tsx +42 -0
- package/src/pages-v2/checkout/checkout-alt-summary/checkout-alt-summary.tsx +42 -0
- package/src/pages-v2/checkout/checkout-alt-summary/index.ts +1 -0
- package/src/pages-v2/checkout/checkout-alt-summary/list-item.tsx +31 -0
- package/src/pages-v2/confirmation/address.tsx +25 -0
- package/src/pages-v2/confirmation/confirmation-summary.tsx +55 -0
- package/src/pages-v2/confirmation/ordered-products.tsx +115 -0
- package/src/pages-v2/product-details/available-shops.tsx +48 -0
- package/src/pages-v2/product-details/bopis/find-in-store-button.tsx +63 -0
- package/src/pages-v2/product-details/bopis/find-in-store-modal.tsx +257 -0
- package/src/pages-v2/product-details/bopis/pickup-option-select.tsx +127 -0
- package/src/pages-v2/product-details/bopis/search-header.tsx +69 -0
- package/src/pages-v2/product-details/checkbox-label.tsx +20 -0
- package/src/pages-v2/product-details/currency.ts +64 -0
- package/src/pages-v2/product-details/frequently-bought.tsx +97 -0
- package/src/pages-v2/product-details/frequently-product-card.tsx +63 -0
- package/src/pages-v2/product-details/product-comment.tsx +49 -0
- package/src/pages-v2/product-details/product-description.tsx +22 -0
- package/src/pages-v2/product-details/product-filter-card.tsx +265 -0
- package/src/pages-v2/product-details/product-intro/product-intro-images.tsx +90 -0
- package/src/pages-v2/product-details/product-intro/product-intro.tsx +256 -0
- package/src/pages-v2/product-details/product-review.tsx +131 -0
- package/src/pages-v2/product-details/product-tabs.tsx +51 -0
- package/src/pages-v2/product-details/related-products.tsx +42 -0
- package/src/pages-v2/product-details/types.ts +11 -0
- package/src/pages-v2/product-list/breadcrumbs.tsx +39 -0
- package/src/pages-v2/product-list/checkbox-label.tsx +20 -0
- package/src/pages-v2/product-list/facet-group.tsx +125 -0
- package/src/pages-v2/product-list/facet.tsx +36 -0
- package/src/pages-v2/product-list/list-filter.tsx +43 -0
- package/src/pages-v2/product-list/pagination.tsx +80 -0
- package/src/pages-v2/product-list/product-list-context.tsx +302 -0
- package/src/pages-v2/product-list/product-list-state.ts +187 -0
- package/src/pages-v2/product-list/product-rating.tsx +16 -0
- package/src/pages-v2/product-list/quick-view-dialog-content.tsx +207 -0
- package/src/pages-v2/product-list/quick-view-dialog.tsx +54 -0
- package/src/pages-v2/product-list/range-filter.tsx +125 -0
- package/src/pages-v2/product-list/scrollbar.tsx +38 -0
- package/src/pages-v2/product-list/search-bar.tsx +162 -0
- package/src/pages-v2/product-list/selected-facets.tsx +80 -0
- package/src/pages-v2/product-list/side-nav.tsx +49 -0
- package/src/pages-v2/product-list/swatch.tsx +80 -0
- package/src/pages-v2/product-list/types.ts +18 -0
- package/src/pages-v2/product-list/use-product-list.ts +12 -0
- package/src/pages-v2/product-list/useCategoryFilter.tsx +26 -0
- package/src/pages-v2/product-list/utils/facet-helpers.ts +5 -0
- package/src/pages-v2/product-list/utils/generate-breadcrumbs.ts +30 -0
- package/src/pages-v2/product-list/utils/getCategoryFilterFromSlug.ts +153 -0
- package/src/pages-v2/product-list/utils/product-list-helper.ts +111 -0
- package/src/pages-v2/product-list/utils/product-list-types.ts +41 -0
- package/src/pages-v2/product-list/utils/search-for-category.ts +76 -0
- package/src/pages-v2/product-list/utils/sort-options.ts +44 -0
- package/src/pages-v2/product-list/utils/use-previous-refiners.ts +14 -0
- package/src/pages-v2/quickorder/order-upload.tsx +150 -0
- package/src/pages-v2/quickorder/quick-order-form.tsx +346 -0
- package/src/pages-v2/quickorder/quick-order-row.tsx +144 -0
- package/src/providers/nav-provider/index.tsx +59 -0
- package/src/providers/nav-provider/utils/createLink.ts +15 -0
- package/src/providers/notifications/README.md +15 -0
- package/src/providers/notifications/notification-context.tsx +82 -0
- package/src/providers/notifications/use-notification.ts +12 -0
- package/tsconfig.json +3 -2
- package/typedoc.js +10 -0
- package/src/api-manager/api-manager.config.json +0 -12
- package/src/api-manager/datasources/e4/e4.remaps.ts +0 -355
- package/src/api-manager/datasources/e4/e4.translator.test.ts +0 -202
- /package/src/hooks/{use-cart.tsx → use-cart.ts} +0 -0
- /package/src/hooks/{use-variants.tsx → use-variants.ts} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import styled from "@mui/material/styles/styled";
|
|
4
|
+
|
|
5
|
+
// STYLED COMPONENTS
|
|
6
|
+
export const StyledRoot = styled("div")(({ theme }) => ({
|
|
7
|
+
gap: 16,
|
|
8
|
+
flexGrow: 1,
|
|
9
|
+
display: "flex",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
justifyContent: "center",
|
|
12
|
+
borderRight: `1px solid ${theme.palette.grey[400]}`,
|
|
13
|
+
":last-child": { borderRight: 0 },
|
|
14
|
+
|
|
15
|
+
[theme.breakpoints.down("md")]: {
|
|
16
|
+
":nth-of-type(even)": { borderRight: 0 },
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
[theme.breakpoints.down("sm")]: {
|
|
20
|
+
borderRight: 0,
|
|
21
|
+
justifyContent: "flex-start",
|
|
22
|
+
},
|
|
23
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./setting";
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { useRouter } from "next/navigation";
|
|
5
|
+
// MUI
|
|
6
|
+
import Button from "@mui/material/Button";
|
|
7
|
+
import Divider from "@mui/material/Divider";
|
|
8
|
+
import Tooltip from "@mui/material/Tooltip";
|
|
9
|
+
import ClickAwayListener from "@mui/material/ClickAwayListener";
|
|
10
|
+
// MUI ICON COMPONENTS
|
|
11
|
+
import Close from "@mui/icons-material/Close";
|
|
12
|
+
import Settings from "@mui/icons-material/Settings";
|
|
13
|
+
// LOCAL CUSTOM COMPONENTS
|
|
14
|
+
import { H6 } from "@evenicanpm/storefront-core/src/components-v2/Typography";
|
|
15
|
+
import Scrollbar from "@evenicanpm/storefront-core/src/components-v2/scrollbar/scrollbar";
|
|
16
|
+
import FlexBox from "@evenicanpm/storefront-core/src/components-v2/flex-box/flex-box";
|
|
17
|
+
// GLOBAL CUSTOM HOOK
|
|
18
|
+
import useSettings from "@evenicanpm/storefront-core/src/hooks/use-settings";
|
|
19
|
+
// STYLED COMPONENTS
|
|
20
|
+
import {
|
|
21
|
+
BodyWrapper,
|
|
22
|
+
MainContainer,
|
|
23
|
+
StyledAvatar,
|
|
24
|
+
StyledIconButton,
|
|
25
|
+
} from "./styles";
|
|
26
|
+
|
|
27
|
+
export default function Setting() {
|
|
28
|
+
const { push } = useRouter();
|
|
29
|
+
const { updateSettings, settings } = useSettings();
|
|
30
|
+
const [showBody, setShowBody] = useState(false);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<ClickAwayListener onClickAway={() => setShowBody(false)}>
|
|
34
|
+
<MainContainer>
|
|
35
|
+
<Tooltip title="Settings & Demos" placement="left">
|
|
36
|
+
<StyledIconButton onClick={() => setShowBody((state) => !state)}>
|
|
37
|
+
{!showBody && <Settings />}
|
|
38
|
+
{showBody && <Close />}
|
|
39
|
+
</StyledIconButton>
|
|
40
|
+
</Tooltip>
|
|
41
|
+
|
|
42
|
+
<BodyWrapper showBody={showBody ? 1 : 0}>
|
|
43
|
+
<Scrollbar sx={{ maxHeight: showBody ? "calc(100vh - 200px)" : 0 }}>
|
|
44
|
+
<FlexBox gap={2}>
|
|
45
|
+
<Button
|
|
46
|
+
fullWidth
|
|
47
|
+
onClick={() => updateSettings({ direction: "rtl" })}
|
|
48
|
+
color={settings.direction === "rtl" ? "primary" : "secondary"}
|
|
49
|
+
variant={
|
|
50
|
+
settings.direction === "rtl" ? "contained" : "outlined"
|
|
51
|
+
}
|
|
52
|
+
>
|
|
53
|
+
RTL
|
|
54
|
+
</Button>
|
|
55
|
+
|
|
56
|
+
<Button
|
|
57
|
+
fullWidth
|
|
58
|
+
onClick={() => updateSettings({ direction: "ltr" })}
|
|
59
|
+
color={settings.direction === "ltr" ? "primary" : "secondary"}
|
|
60
|
+
variant={
|
|
61
|
+
settings.direction === "ltr" ? "contained" : "outlined"
|
|
62
|
+
}
|
|
63
|
+
>
|
|
64
|
+
LTR
|
|
65
|
+
</Button>
|
|
66
|
+
</FlexBox>
|
|
67
|
+
|
|
68
|
+
<Divider sx={{ my: 3 }} />
|
|
69
|
+
|
|
70
|
+
<H6 textAlign="center" mb={2}>
|
|
71
|
+
Bazaar Demos
|
|
72
|
+
</H6>
|
|
73
|
+
|
|
74
|
+
<FlexBox gap={2} flexWrap="wrap">
|
|
75
|
+
{demos.map((demo) => (
|
|
76
|
+
<StyledAvatar
|
|
77
|
+
key={demo.id}
|
|
78
|
+
src={demo.img}
|
|
79
|
+
onClick={() => push(demo.path)}
|
|
80
|
+
/>
|
|
81
|
+
))}
|
|
82
|
+
</FlexBox>
|
|
83
|
+
</Scrollbar>
|
|
84
|
+
</BodyWrapper>
|
|
85
|
+
</MainContainer>
|
|
86
|
+
</ClickAwayListener>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const demos = [
|
|
91
|
+
{
|
|
92
|
+
id: 17,
|
|
93
|
+
path: "/furniture-3",
|
|
94
|
+
img: "/assets/images/landing/home/furniture-3.jpg",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 16,
|
|
98
|
+
path: "/gadget-3",
|
|
99
|
+
img: "/assets/images/landing/home/gadget-3.jpg",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 15,
|
|
103
|
+
path: "/grocery-4",
|
|
104
|
+
img: "/assets/images/landing/home/grocery-4.jpg",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 12,
|
|
108
|
+
path: "/furniture-2",
|
|
109
|
+
img: "/assets/images/landing/home/furniture-2.jpg",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: 13,
|
|
113
|
+
path: "/gadget-2",
|
|
114
|
+
img: "/assets/images/landing/home/gadget-2.png",
|
|
115
|
+
},
|
|
116
|
+
{ id: 14, path: "/medical", img: "/assets/images/landing/home/medical.png" },
|
|
117
|
+
{
|
|
118
|
+
id: 5,
|
|
119
|
+
path: "/fashion-3",
|
|
120
|
+
img: "/assets/images/landing/home/fashion-3.jpg",
|
|
121
|
+
},
|
|
122
|
+
{ id: 0, path: "/market-1", img: "/assets/images/landing/page-1.png" },
|
|
123
|
+
{ id: 1, path: "/market-2", img: "/assets/images/landing/home/market-2.jpg" },
|
|
124
|
+
{ id: 9, path: "/grocery-1", img: "/assets/images/landing/grocery1.png" },
|
|
125
|
+
{ id: 2, path: "/grocery-2", img: "/assets/images/landing/page-2.png" },
|
|
126
|
+
{ id: 10, path: "/grocery-3", img: "/assets/images/landing/grocery3.png" },
|
|
127
|
+
{ id: 3, path: "/fashion-1", img: "/assets/images/landing/page-3.png" },
|
|
128
|
+
{
|
|
129
|
+
id: 4,
|
|
130
|
+
path: "/fashion-2",
|
|
131
|
+
img: "/assets/images/landing/home/fashion-2.jpg",
|
|
132
|
+
},
|
|
133
|
+
{ id: 6, path: "/gadget-1", img: "/assets/images/landing/page-4.png" },
|
|
134
|
+
{ id: 7, path: "/furniture-1", img: "/assets/images/landing/furniture.png" },
|
|
135
|
+
{ id: 8, path: "/gift-shop", img: "/assets/images/landing/gift-shop.png" },
|
|
136
|
+
{
|
|
137
|
+
id: 11,
|
|
138
|
+
path: "/health-beauty",
|
|
139
|
+
img: "/assets/images/landing/healthbeauty.png",
|
|
140
|
+
},
|
|
141
|
+
];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import Avatar from "@mui/material/Avatar";
|
|
2
|
+
import styled from "@mui/material/styles/styled";
|
|
3
|
+
import IconButton from "@mui/material/IconButton";
|
|
4
|
+
|
|
5
|
+
export const MainContainer = styled("div")(({ theme }) => ({
|
|
6
|
+
top: 50,
|
|
7
|
+
right: 50,
|
|
8
|
+
zIndex: 1501,
|
|
9
|
+
position: "fixed",
|
|
10
|
+
[theme.breakpoints.down("md")]: { display: "none" },
|
|
11
|
+
}));
|
|
12
|
+
|
|
13
|
+
export const StyledIconButton = styled(IconButton)(({ theme }) => ({
|
|
14
|
+
right: 50,
|
|
15
|
+
zIndex: 99,
|
|
16
|
+
bottom: 50,
|
|
17
|
+
padding: 12,
|
|
18
|
+
color: "#fff",
|
|
19
|
+
position: "fixed",
|
|
20
|
+
borderRadius: "50%",
|
|
21
|
+
boxShadow: theme.shadows[12],
|
|
22
|
+
backgroundColor: theme.palette.primary.main,
|
|
23
|
+
":hover": { backgroundColor: theme.palette.primary.main },
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
export const BodyWrapper = styled("div", {
|
|
27
|
+
shouldForwardProp: (props) => props !== "showBody",
|
|
28
|
+
})<{ showBody: number }>(({ theme, showBody }) => ({
|
|
29
|
+
borderRadius: "4px",
|
|
30
|
+
backgroundColor: "white",
|
|
31
|
+
opacity: showBody ? 1 : 0,
|
|
32
|
+
width: showBody ? 300 : 0,
|
|
33
|
+
padding: showBody ? 24 : 0,
|
|
34
|
+
boxShadow: theme.shadows[3],
|
|
35
|
+
transition: "transform 0.4s",
|
|
36
|
+
// maxHeight: showBody ? "calc(100vh - 100px)" : 0,
|
|
37
|
+
transform: `translateY(${showBody ? 0 : "10px"})`,
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
export const StyledAvatar = styled(Avatar)({
|
|
41
|
+
flexGrow: 1,
|
|
42
|
+
height: 100,
|
|
43
|
+
width: "45%",
|
|
44
|
+
cursor: "pointer",
|
|
45
|
+
borderRadius: "10px",
|
|
46
|
+
":last-of-type": { flexGrow: 0 },
|
|
47
|
+
":hover": { "&::after": { opacity: 0.5 } },
|
|
48
|
+
"::after": {
|
|
49
|
+
opacity: 0,
|
|
50
|
+
content: '""',
|
|
51
|
+
width: "100%",
|
|
52
|
+
height: "100%",
|
|
53
|
+
background: "black",
|
|
54
|
+
position: "absolute",
|
|
55
|
+
transition: "all 0.3s",
|
|
56
|
+
},
|
|
57
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./shop-card";
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import Card from "@mui/material/Card";
|
|
2
|
+
|
|
3
|
+
import AccessTimeFilledIcon from "@mui/icons-material/AccessTimeFilled";
|
|
4
|
+
import Place from "@mui/icons-material/Place";
|
|
5
|
+
import InventoryIcon from "@mui/icons-material/Inventory";
|
|
6
|
+
// GLOBAL CUSTOM COMPONENTS
|
|
7
|
+
import { H3, Span } from "../Typography";
|
|
8
|
+
import { FlexBetween, FlexBox } from "../flex-box/index";
|
|
9
|
+
// STYLED COMPONENT
|
|
10
|
+
import { ContentWrapper } from "./styles";
|
|
11
|
+
import {
|
|
12
|
+
ProductWarehouseInventoryAvailability,
|
|
13
|
+
StoreHours,
|
|
14
|
+
} from "@msdyn365-commerce/retail-proxy";
|
|
15
|
+
import {
|
|
16
|
+
buildStoreHours,
|
|
17
|
+
IHoursDisplayInfo,
|
|
18
|
+
IStoreSelectorLocationLineItemResources,
|
|
19
|
+
} from "@/lib/store-hours-helper";
|
|
20
|
+
import { Box } from "@mui/system";
|
|
21
|
+
import { useTranslations } from "next-intl";
|
|
22
|
+
|
|
23
|
+
type Props = {
|
|
24
|
+
name: string;
|
|
25
|
+
address: string;
|
|
26
|
+
actionArea: React.ReactNode;
|
|
27
|
+
openFrom: number;
|
|
28
|
+
openTo: number;
|
|
29
|
+
storeHours: StoreHours;
|
|
30
|
+
inventoryRecord: ProductWarehouseInventoryAvailability | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default function ShopCard(props: Props) {
|
|
34
|
+
const { name, address, actionArea, openFrom, openTo, storeHours } =
|
|
35
|
+
props || {};
|
|
36
|
+
const daysTrans = useTranslations("StoreHours");
|
|
37
|
+
|
|
38
|
+
const convertNumberToTime = (numberinSeconds: number) => {
|
|
39
|
+
const date = new Date(numberinSeconds * 1000);
|
|
40
|
+
const hours = date.getUTCHours();
|
|
41
|
+
const minutes = date.getUTCMinutes();
|
|
42
|
+
const ampm = hours >= 12 ? "PM" : "AM";
|
|
43
|
+
const formattedHours = hours % 12 || 12; // Convert to 12-hour format
|
|
44
|
+
const formattedMinutes = minutes < 10 ? `0${minutes}` : minutes;
|
|
45
|
+
return `${formattedHours}:${formattedMinutes} ${ampm}`;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const resources: IStoreSelectorLocationLineItemResources = {
|
|
49
|
+
days: {
|
|
50
|
+
monday: daysTrans("mon"),
|
|
51
|
+
tuesday: daysTrans("tue"),
|
|
52
|
+
wednesday: daysTrans("wed"),
|
|
53
|
+
thursday: daysTrans("thu"),
|
|
54
|
+
friday: daysTrans("fri"),
|
|
55
|
+
saturday: daysTrans("sat"),
|
|
56
|
+
sunday: daysTrans("sun"),
|
|
57
|
+
mondayFull: daysTrans("monday"),
|
|
58
|
+
tuesdayFull: daysTrans("tuesday"),
|
|
59
|
+
wednesdayFull: daysTrans("wednesday"),
|
|
60
|
+
thursdayFull: daysTrans("thursday"),
|
|
61
|
+
fridayFull: daysTrans("friday"),
|
|
62
|
+
saturdayFull: daysTrans("saturday"),
|
|
63
|
+
sundayFull: daysTrans("sunday"),
|
|
64
|
+
},
|
|
65
|
+
closedText: daysTrans("closed"),
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const renderStoreHours = () => {
|
|
69
|
+
if (storeHours?.RegularStoreHours) {
|
|
70
|
+
const storeHoursList: IHoursDisplayInfo[] = buildStoreHours(
|
|
71
|
+
storeHours.RegularStoreHours,
|
|
72
|
+
resources,
|
|
73
|
+
);
|
|
74
|
+
return (
|
|
75
|
+
<div className="ms-store-select__store-hours-details-group">
|
|
76
|
+
{storeHoursList.map((displayTime) => (
|
|
77
|
+
<div
|
|
78
|
+
className="ms-store-select__store-hours-details"
|
|
79
|
+
key={JSON.stringify(displayTime)}
|
|
80
|
+
>
|
|
81
|
+
{displayTime.endDayShort ? (
|
|
82
|
+
<Box>
|
|
83
|
+
<Span>
|
|
84
|
+
<abbr title={displayTime.startDayFull}>
|
|
85
|
+
{displayTime.startDayShort}
|
|
86
|
+
</abbr>
|
|
87
|
+
</Span>
|
|
88
|
+
–
|
|
89
|
+
<Span>
|
|
90
|
+
<abbr title={displayTime.endDayFull}>
|
|
91
|
+
{displayTime.endDayShort}
|
|
92
|
+
</abbr>
|
|
93
|
+
</Span>
|
|
94
|
+
</Box>
|
|
95
|
+
) : (
|
|
96
|
+
<Box>
|
|
97
|
+
<Span>
|
|
98
|
+
<abbr title={displayTime.startDayFull}>
|
|
99
|
+
{displayTime.startDayShort}
|
|
100
|
+
</abbr>
|
|
101
|
+
</Span>
|
|
102
|
+
</Box>
|
|
103
|
+
)}
|
|
104
|
+
<Box>{displayTime.timeRange}</Box>
|
|
105
|
+
</div>
|
|
106
|
+
))}
|
|
107
|
+
</div>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
return (
|
|
111
|
+
<Span color="white">
|
|
112
|
+
{convertNumberToTime(openFrom)} - {convertNumberToTime(openTo)}
|
|
113
|
+
</Span>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<Card sx={{ marginBottom: 2 }}>
|
|
119
|
+
<ContentWrapper img={""}>
|
|
120
|
+
<H3 fontWeight="600" mb={1}>
|
|
121
|
+
{name}
|
|
122
|
+
</H3>
|
|
123
|
+
|
|
124
|
+
{/* <Rating value={rating || 0} color="warn" size="small" readOnly className="mb-1" /> */}
|
|
125
|
+
|
|
126
|
+
<FlexBox mb={1} gap={1}>
|
|
127
|
+
<Place fontSize="small" sx={{ fontSize: 17, mt: "3px" }} />
|
|
128
|
+
<Span color="white">{address}</Span>
|
|
129
|
+
</FlexBox>
|
|
130
|
+
|
|
131
|
+
<FlexBox alignItems="center" gap={1}>
|
|
132
|
+
<AccessTimeFilledIcon
|
|
133
|
+
fontSize="small"
|
|
134
|
+
sx={{ fontSize: 17, mt: "3px" }}
|
|
135
|
+
/>
|
|
136
|
+
{renderStoreHours()}
|
|
137
|
+
</FlexBox>
|
|
138
|
+
|
|
139
|
+
<FlexBox my={1} gap={1}>
|
|
140
|
+
<InventoryIcon fontSize="small" sx={{ fontSize: 17, mt: "3px" }} />
|
|
141
|
+
<Span color="white">
|
|
142
|
+
{props.inventoryRecord?.TotalAvailableInventoryLevelLabel}
|
|
143
|
+
</Span>
|
|
144
|
+
</FlexBox>
|
|
145
|
+
</ContentWrapper>
|
|
146
|
+
|
|
147
|
+
<FlexBetween pl={3} pr={1} justifyContent={"flex-end"}>
|
|
148
|
+
{actionArea}
|
|
149
|
+
</FlexBetween>
|
|
150
|
+
</Card>
|
|
151
|
+
);
|
|
152
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Avatar from "@mui/material/Avatar";
|
|
4
|
+
import IconButton from "@mui/material/IconButton";
|
|
5
|
+
import { alpha, styled } from "@mui/material/styles";
|
|
6
|
+
|
|
7
|
+
// STYLED COMPONENT
|
|
8
|
+
export const ContentWrapper = styled("div", {
|
|
9
|
+
shouldForwardProp: (prop) => prop !== "img",
|
|
10
|
+
})<{ img: string }>(({ theme, img }) => ({
|
|
11
|
+
color: "white",
|
|
12
|
+
backgroundSize: "cover",
|
|
13
|
+
padding: "17px 30px 56px",
|
|
14
|
+
backgroundPosition: "center",
|
|
15
|
+
backgroundImage: `linear-gradient(to bottom,
|
|
16
|
+
${alpha(theme.palette.grey[900], 0.8)}, ${alpha(theme.palette.grey[900], 0.8)}),
|
|
17
|
+
url(${img})`,
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
export const StyledAvatar = styled(Avatar)(({ theme }) => ({
|
|
21
|
+
width: 64,
|
|
22
|
+
height: 64,
|
|
23
|
+
marginTop: "-32px",
|
|
24
|
+
border: `3px solid ${theme.palette.grey[100]}`,
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
export const StyledIconButton = styled(IconButton)(({ theme }) => ({
|
|
28
|
+
marginBlock: 4,
|
|
29
|
+
".icon": {
|
|
30
|
+
fontSize: 19,
|
|
31
|
+
transform: theme.direction === "rtl" ? "180deg" : "0deg",
|
|
32
|
+
},
|
|
33
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./side-nav";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useEffect, useState, ReactNode } from "react";
|
|
2
|
+
import Drawer from "@mui/material/Drawer";
|
|
3
|
+
// GLOBAL CUSTOM COMPONENT
|
|
4
|
+
import Scrollbar from "@evenicanpm/storefront-core/src/components-v2/scrollbar/index";
|
|
5
|
+
|
|
6
|
+
// ================================================================
|
|
7
|
+
interface Props {
|
|
8
|
+
open?: boolean;
|
|
9
|
+
width?: number;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
toggle?: () => void;
|
|
12
|
+
position?: "left" | "right";
|
|
13
|
+
handler: (event: () => void) => ReactNode;
|
|
14
|
+
}
|
|
15
|
+
// ================================================================
|
|
16
|
+
|
|
17
|
+
export default function SideNav(props: Props) {
|
|
18
|
+
const {
|
|
19
|
+
position = "left",
|
|
20
|
+
open = false,
|
|
21
|
+
width = 280,
|
|
22
|
+
children,
|
|
23
|
+
handler,
|
|
24
|
+
toggle,
|
|
25
|
+
} = props;
|
|
26
|
+
|
|
27
|
+
const [sideNavOpen, setSideNavOpen] = useState(open);
|
|
28
|
+
const handleToggleSideNav = () => setSideNavOpen(!sideNavOpen);
|
|
29
|
+
|
|
30
|
+
useEffect(() => setSideNavOpen(open), [open]);
|
|
31
|
+
|
|
32
|
+
const handleClose = toggle || handleToggleSideNav;
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div>
|
|
36
|
+
<Drawer
|
|
37
|
+
anchor={position}
|
|
38
|
+
open={sideNavOpen}
|
|
39
|
+
onClose={handleClose}
|
|
40
|
+
SlideProps={{ style: { width } }}
|
|
41
|
+
sx={{ zIndex: 15001 }}
|
|
42
|
+
>
|
|
43
|
+
<Scrollbar autoHide={false}>{children}</Scrollbar>
|
|
44
|
+
</Drawer>
|
|
45
|
+
|
|
46
|
+
{handler(handleClose)}
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
|
|
5
|
+
interface SiteLogoProps {
|
|
6
|
+
height?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const SiteLogo: React.FC<SiteLogoProps> = () => {
|
|
10
|
+
return (
|
|
11
|
+
<Link href="/">
|
|
12
|
+
<img src={"/logo-blue.png"} alt="E4 Logo" height={54} />
|
|
13
|
+
</Link>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default SiteLogo;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState, ReactNode } from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { StyledBox } from "./styles";
|
|
4
|
+
|
|
5
|
+
// ============================================================
|
|
6
|
+
interface Props {
|
|
7
|
+
fixedOn: number;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
scrollDistance?: number;
|
|
10
|
+
onSticky?: (isFixed: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// ============================================================
|
|
14
|
+
|
|
15
|
+
export default function Sticky({
|
|
16
|
+
fixedOn,
|
|
17
|
+
children,
|
|
18
|
+
onSticky,
|
|
19
|
+
scrollDistance = 0,
|
|
20
|
+
}: Props) {
|
|
21
|
+
const [fixed, setFixed] = useState(false);
|
|
22
|
+
const elementRef = useRef<HTMLDivElement>(null);
|
|
23
|
+
const [height, setHeight] = useState(0);
|
|
24
|
+
|
|
25
|
+
const scrollListener = useCallback(() => {
|
|
26
|
+
if (!window) return;
|
|
27
|
+
|
|
28
|
+
const isFixed = window.scrollY >= fixedOn + scrollDistance;
|
|
29
|
+
setFixed(isFixed);
|
|
30
|
+
}, [fixedOn, scrollDistance]);
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (!window) return;
|
|
34
|
+
|
|
35
|
+
window.addEventListener("scroll", scrollListener);
|
|
36
|
+
window.addEventListener("resize", scrollListener);
|
|
37
|
+
|
|
38
|
+
return () => {
|
|
39
|
+
window.removeEventListener("scroll", scrollListener);
|
|
40
|
+
window.removeEventListener("resize", scrollListener);
|
|
41
|
+
};
|
|
42
|
+
}, [scrollListener]);
|
|
43
|
+
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (onSticky) onSticky(fixed);
|
|
46
|
+
}, [fixed, onSticky]);
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (elementRef.current) {
|
|
50
|
+
setHeight(elementRef.current.offsetHeight);
|
|
51
|
+
scrollListener();
|
|
52
|
+
}
|
|
53
|
+
}, [scrollListener]);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<StyledBox fixedOn={fixedOn} componentHeight={height} fixed={fixed}>
|
|
57
|
+
<div className={clsx({ hold: !fixed, fixed: fixed })} ref={elementRef}>
|
|
58
|
+
{children}
|
|
59
|
+
</div>
|
|
60
|
+
</StyledBox>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Sticky";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { keyframes, styled } from "@mui/material/styles";
|
|
2
|
+
|
|
3
|
+
// ==============================================================
|
|
4
|
+
interface Props {
|
|
5
|
+
fixed?: boolean;
|
|
6
|
+
fixedOn?: number;
|
|
7
|
+
componentHeight?: number;
|
|
8
|
+
}
|
|
9
|
+
// ==============================================================
|
|
10
|
+
|
|
11
|
+
const slideDown = keyframes`
|
|
12
|
+
from {transform: translateY(-200%)}
|
|
13
|
+
to {transform: translateY(0)}
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
export const StyledBox = styled("div", {
|
|
17
|
+
shouldForwardProp: (prop) =>
|
|
18
|
+
prop !== "componentHeight" && prop !== "fixed" && prop !== "fixedOn",
|
|
19
|
+
})<Props>(({ theme, componentHeight, fixedOn, fixed }) => ({
|
|
20
|
+
paddingTop: fixed ? componentHeight : 0,
|
|
21
|
+
|
|
22
|
+
"& .hold": {
|
|
23
|
+
zIndex: 5,
|
|
24
|
+
boxShadow: "none",
|
|
25
|
+
position: "relative",
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
"& .fixed": {
|
|
29
|
+
left: 0,
|
|
30
|
+
right: 0,
|
|
31
|
+
zIndex: 1500,
|
|
32
|
+
position: "fixed",
|
|
33
|
+
top: `${fixedOn}px`,
|
|
34
|
+
boxShadow: theme.shadows[2],
|
|
35
|
+
transition: "all 350ms ease-in-out",
|
|
36
|
+
animation: `${slideDown} 400ms ${theme.transitions.easing.easeInOut}`,
|
|
37
|
+
},
|
|
38
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./sticky-wrapper";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactNode } from "react";
|
|
2
|
+
import Container from "@mui/material/Container";
|
|
3
|
+
// STYLED COMPONENTS
|
|
4
|
+
import { ContentWrapper } from "./styles";
|
|
5
|
+
|
|
6
|
+
// ==============================================================
|
|
7
|
+
interface Props extends PropsWithChildren {
|
|
8
|
+
SideNav: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
// ==============================================================
|
|
11
|
+
|
|
12
|
+
export default function StickyWrapper({ SideNav, children }: Props) {
|
|
13
|
+
return (
|
|
14
|
+
<Container>
|
|
15
|
+
<ContentWrapper>
|
|
16
|
+
<div className="sidebar">{SideNav}</div>
|
|
17
|
+
<div className="content">{children}</div>
|
|
18
|
+
</ContentWrapper>
|
|
19
|
+
</Container>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import styled from "@mui/material/styles/styled";
|
|
4
|
+
import { layoutConstant } from "@evenicanpm/storefront-core/src/components-v2/utils/constants";
|
|
5
|
+
|
|
6
|
+
export const ContentWrapper = styled("div")(({ theme }) => ({
|
|
7
|
+
display: "flex",
|
|
8
|
+
position: "relative",
|
|
9
|
+
|
|
10
|
+
".sidebar": {
|
|
11
|
+
width: "100%",
|
|
12
|
+
height: "100%",
|
|
13
|
+
position: "sticky",
|
|
14
|
+
top: layoutConstant.headerHeight + 15,
|
|
15
|
+
maxWidth: layoutConstant.grocerySidenavWidth,
|
|
16
|
+
[theme.breakpoints.down("md")]: { display: "none" },
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
".content": {
|
|
20
|
+
width: "100%",
|
|
21
|
+
paddingLeft: "2rem",
|
|
22
|
+
maxWidth: `calc(100% - ${layoutConstant.grocerySidenavWidth}px)`,
|
|
23
|
+
[theme.breakpoints.down("md")]: { maxWidth: "100%", paddingLeft: 0 },
|
|
24
|
+
},
|
|
25
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./story-content";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import Link from "next/link";
|
|
2
|
+
import LazyImage from "@evenicanpm/storefront-core/src/components-v2/LazyImage";
|
|
3
|
+
// STYLED COMPONENT
|
|
4
|
+
import { StyledButton, StyledRoot } from "./styles";
|
|
5
|
+
|
|
6
|
+
// ==============================================================
|
|
7
|
+
interface Props {
|
|
8
|
+
image: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
}
|
|
11
|
+
// ==============================================================
|
|
12
|
+
|
|
13
|
+
export default function StoryContent({ image, url }: Props) {
|
|
14
|
+
return (
|
|
15
|
+
<StyledRoot>
|
|
16
|
+
<LazyImage src={image} width={450} height={824} alt="Story" />
|
|
17
|
+
|
|
18
|
+
<StyledButton
|
|
19
|
+
color="primary"
|
|
20
|
+
variant="contained"
|
|
21
|
+
LinkComponent={Link}
|
|
22
|
+
href={url}
|
|
23
|
+
>
|
|
24
|
+
View More
|
|
25
|
+
</StyledButton>
|
|
26
|
+
</StyledRoot>
|
|
27
|
+
);
|
|
28
|
+
}
|