From f502f06778419d8133d13c99db26fd16f9079414 Mon Sep 17 00:00:00 2001 From: renan04lima Date: Mon, 4 Mar 2024 20:33:20 -0300 Subject: [PATCH 1/2] feat: add accordion --- components/daisy/Accordion.tsx | 34 ++++++-- manifest.gen.ts | 146 +++++++++++++++++---------------- sections/Content/Pillars.tsx | 44 ++++++++++ 3 files changed, 146 insertions(+), 78 deletions(-) create mode 100644 sections/Content/Pillars.tsx diff --git a/components/daisy/Accordion.tsx b/components/daisy/Accordion.tsx index b36e4e5..ee23ee3 100644 --- a/components/daisy/Accordion.tsx +++ b/components/daisy/Accordion.tsx @@ -4,19 +4,41 @@ export interface Props { interface Child { title: string; - subtitle: string; + description: string; } export default function Accordion(props: Props) { const { children } = props; + return ( <> - {children.map((c) => { + {children.map((c, index) => { return ( -
- -
{c.title}
-
{c.subtitle}
+
+ +

+ {index + 1} +

+ +
+

{c.description}

+
); })} diff --git a/manifest.gen.ts b/manifest.gen.ts index 3b8674a..6693bf8 100644 --- a/manifest.gen.ts +++ b/manifest.gen.ts @@ -26,42 +26,43 @@ import * as $$$$$$14 from "./sections/Content/Hero.tsx"; import * as $$$$$$15 from "./sections/Content/Intro.tsx"; import * as $$$$$$16 from "./sections/Content/Logos.tsx"; import * as $$$$$$17 from "./sections/Content/Partners.tsx"; -import * as $$$$$$18 from "./sections/Content/RichText.tsx"; -import * as $$$$$$19 from "./sections/Content/Table.tsx"; -import * as $$$$$$20 from "./sections/Content/Testimonials.tsx"; -import * as $$$$$$21 from "./sections/Content/TextSection.tsx"; -import * as $$$$$$22 from "./sections/Content/TextWithImage.tsx"; -import * as $$$$$$23 from "./sections/Content/VideoSection.tsx"; -import * as $$$$$$24 from "./sections/Footer/Footer.tsx"; -import * as $$$$$$25 from "./sections/Gallery.tsx"; -import * as $$$$$$26 from "./sections/Header/Header.tsx"; -import * as $$$$$$27 from "./sections/Images/BannerGrid.tsx"; -import * as $$$$$$28 from "./sections/Images/Carousel.tsx"; -import * as $$$$$$29 from "./sections/Images/ImageGallery.tsx"; -import * as $$$$$$30 from "./sections/Images/ShoppableBanner.tsx"; -import * as $$$$$$31 from "./sections/Layout/Container.tsx"; -import * as $$$$$$32 from "./sections/Layout/Flex.tsx"; -import * as $$$$$$33 from "./sections/Layout/Grid.tsx"; -import * as $$$$$$34 from "./sections/Layout/GridItem.tsx"; -import * as $$$$$$35 from "./sections/Links/LinkTree.tsx"; -import * as $$$$$$36 from "./sections/Links/Shortcuts.tsx"; -import * as $$$$$$37 from "./sections/Miscellaneous/CampaignTimer.tsx"; -import * as $$$$$$38 from "./sections/Miscellaneous/CookieConsent.tsx"; -import * as $$$$$$39 from "./sections/Miscellaneous/Slide.tsx"; -import * as $$$$$$40 from "./sections/Newsletter/Newsletter.tsx"; -import * as $$$$$$41 from "./sections/Product/ImageGalleryFrontBack.tsx"; -import * as $$$$$$42 from "./sections/Product/ImageGallerySlider.tsx"; -import * as $$$$$$43 from "./sections/Product/NotFound.tsx"; -import * as $$$$$$44 from "./sections/Product/NotFoundChallenge.tsx"; -import * as $$$$$$45 from "./sections/Product/ProductInfo.tsx"; -import * as $$$$$$46 from "./sections/Product/ProductShelf.tsx"; -import * as $$$$$$47 from "./sections/Product/ProductShelfTabbed.tsx"; -import * as $$$$$$48 from "./sections/Product/SearchResult.tsx"; -import * as $$$$$$49 from "./sections/Product/ShelfWithImage.tsx"; -import * as $$$$$$50 from "./sections/Product/Wishlist.tsx"; -import * as $$$$$$51 from "./sections/Social/InstagramPosts.tsx"; -import * as $$$$$$52 from "./sections/Social/WhatsApp.tsx"; -import * as $$$$$$53 from "./sections/Theme/Theme.tsx"; +import * as $$$$$$18 from "./sections/Content/Pillars.tsx"; +import * as $$$$$$19 from "./sections/Content/RichText.tsx"; +import * as $$$$$$20 from "./sections/Content/Table.tsx"; +import * as $$$$$$21 from "./sections/Content/Testimonials.tsx"; +import * as $$$$$$22 from "./sections/Content/TextSection.tsx"; +import * as $$$$$$23 from "./sections/Content/TextWithImage.tsx"; +import * as $$$$$$24 from "./sections/Content/VideoSection.tsx"; +import * as $$$$$$25 from "./sections/Footer/Footer.tsx"; +import * as $$$$$$26 from "./sections/Gallery.tsx"; +import * as $$$$$$27 from "./sections/Header/Header.tsx"; +import * as $$$$$$28 from "./sections/Images/BannerGrid.tsx"; +import * as $$$$$$29 from "./sections/Images/Carousel.tsx"; +import * as $$$$$$30 from "./sections/Images/ImageGallery.tsx"; +import * as $$$$$$31 from "./sections/Images/ShoppableBanner.tsx"; +import * as $$$$$$32 from "./sections/Layout/Container.tsx"; +import * as $$$$$$33 from "./sections/Layout/Flex.tsx"; +import * as $$$$$$34 from "./sections/Layout/Grid.tsx"; +import * as $$$$$$35 from "./sections/Layout/GridItem.tsx"; +import * as $$$$$$36 from "./sections/Links/LinkTree.tsx"; +import * as $$$$$$37 from "./sections/Links/Shortcuts.tsx"; +import * as $$$$$$38 from "./sections/Miscellaneous/CampaignTimer.tsx"; +import * as $$$$$$39 from "./sections/Miscellaneous/CookieConsent.tsx"; +import * as $$$$$$40 from "./sections/Miscellaneous/Slide.tsx"; +import * as $$$$$$41 from "./sections/Newsletter/Newsletter.tsx"; +import * as $$$$$$42 from "./sections/Product/ImageGalleryFrontBack.tsx"; +import * as $$$$$$43 from "./sections/Product/ImageGallerySlider.tsx"; +import * as $$$$$$44 from "./sections/Product/NotFound.tsx"; +import * as $$$$$$45 from "./sections/Product/NotFoundChallenge.tsx"; +import * as $$$$$$46 from "./sections/Product/ProductInfo.tsx"; +import * as $$$$$$47 from "./sections/Product/ProductShelf.tsx"; +import * as $$$$$$48 from "./sections/Product/ProductShelfTabbed.tsx"; +import * as $$$$$$49 from "./sections/Product/SearchResult.tsx"; +import * as $$$$$$50 from "./sections/Product/ShelfWithImage.tsx"; +import * as $$$$$$51 from "./sections/Product/Wishlist.tsx"; +import * as $$$$$$52 from "./sections/Social/InstagramPosts.tsx"; +import * as $$$$$$53 from "./sections/Social/WhatsApp.tsx"; +import * as $$$$$$54 from "./sections/Theme/Theme.tsx"; const manifest = { "loaders": { @@ -91,42 +92,43 @@ const manifest = { "deco-sites/mira-site/sections/Content/Intro.tsx": $$$$$$15, "deco-sites/mira-site/sections/Content/Logos.tsx": $$$$$$16, "deco-sites/mira-site/sections/Content/Partners.tsx": $$$$$$17, - "deco-sites/mira-site/sections/Content/RichText.tsx": $$$$$$18, - "deco-sites/mira-site/sections/Content/Table.tsx": $$$$$$19, - "deco-sites/mira-site/sections/Content/Testimonials.tsx": $$$$$$20, - "deco-sites/mira-site/sections/Content/TextSection.tsx": $$$$$$21, - "deco-sites/mira-site/sections/Content/TextWithImage.tsx": $$$$$$22, - "deco-sites/mira-site/sections/Content/VideoSection.tsx": $$$$$$23, - "deco-sites/mira-site/sections/Footer/Footer.tsx": $$$$$$24, - "deco-sites/mira-site/sections/Gallery.tsx": $$$$$$25, - "deco-sites/mira-site/sections/Header/Header.tsx": $$$$$$26, - "deco-sites/mira-site/sections/Images/BannerGrid.tsx": $$$$$$27, - "deco-sites/mira-site/sections/Images/Carousel.tsx": $$$$$$28, - "deco-sites/mira-site/sections/Images/ImageGallery.tsx": $$$$$$29, - "deco-sites/mira-site/sections/Images/ShoppableBanner.tsx": $$$$$$30, - "deco-sites/mira-site/sections/Layout/Container.tsx": $$$$$$31, - "deco-sites/mira-site/sections/Layout/Flex.tsx": $$$$$$32, - "deco-sites/mira-site/sections/Layout/Grid.tsx": $$$$$$33, - "deco-sites/mira-site/sections/Layout/GridItem.tsx": $$$$$$34, - "deco-sites/mira-site/sections/Links/LinkTree.tsx": $$$$$$35, - "deco-sites/mira-site/sections/Links/Shortcuts.tsx": $$$$$$36, - "deco-sites/mira-site/sections/Miscellaneous/CampaignTimer.tsx": $$$$$$37, - "deco-sites/mira-site/sections/Miscellaneous/CookieConsent.tsx": $$$$$$38, - "deco-sites/mira-site/sections/Miscellaneous/Slide.tsx": $$$$$$39, - "deco-sites/mira-site/sections/Newsletter/Newsletter.tsx": $$$$$$40, - "deco-sites/mira-site/sections/Product/ImageGalleryFrontBack.tsx": $$$$$$41, - "deco-sites/mira-site/sections/Product/ImageGallerySlider.tsx": $$$$$$42, - "deco-sites/mira-site/sections/Product/NotFound.tsx": $$$$$$43, - "deco-sites/mira-site/sections/Product/NotFoundChallenge.tsx": $$$$$$44, - "deco-sites/mira-site/sections/Product/ProductInfo.tsx": $$$$$$45, - "deco-sites/mira-site/sections/Product/ProductShelf.tsx": $$$$$$46, - "deco-sites/mira-site/sections/Product/ProductShelfTabbed.tsx": $$$$$$47, - "deco-sites/mira-site/sections/Product/SearchResult.tsx": $$$$$$48, - "deco-sites/mira-site/sections/Product/ShelfWithImage.tsx": $$$$$$49, - "deco-sites/mira-site/sections/Product/Wishlist.tsx": $$$$$$50, - "deco-sites/mira-site/sections/Social/InstagramPosts.tsx": $$$$$$51, - "deco-sites/mira-site/sections/Social/WhatsApp.tsx": $$$$$$52, - "deco-sites/mira-site/sections/Theme/Theme.tsx": $$$$$$53, + "deco-sites/mira-site/sections/Content/Pillars.tsx": $$$$$$18, + "deco-sites/mira-site/sections/Content/RichText.tsx": $$$$$$19, + "deco-sites/mira-site/sections/Content/Table.tsx": $$$$$$20, + "deco-sites/mira-site/sections/Content/Testimonials.tsx": $$$$$$21, + "deco-sites/mira-site/sections/Content/TextSection.tsx": $$$$$$22, + "deco-sites/mira-site/sections/Content/TextWithImage.tsx": $$$$$$23, + "deco-sites/mira-site/sections/Content/VideoSection.tsx": $$$$$$24, + "deco-sites/mira-site/sections/Footer/Footer.tsx": $$$$$$25, + "deco-sites/mira-site/sections/Gallery.tsx": $$$$$$26, + "deco-sites/mira-site/sections/Header/Header.tsx": $$$$$$27, + "deco-sites/mira-site/sections/Images/BannerGrid.tsx": $$$$$$28, + "deco-sites/mira-site/sections/Images/Carousel.tsx": $$$$$$29, + "deco-sites/mira-site/sections/Images/ImageGallery.tsx": $$$$$$30, + "deco-sites/mira-site/sections/Images/ShoppableBanner.tsx": $$$$$$31, + "deco-sites/mira-site/sections/Layout/Container.tsx": $$$$$$32, + "deco-sites/mira-site/sections/Layout/Flex.tsx": $$$$$$33, + "deco-sites/mira-site/sections/Layout/Grid.tsx": $$$$$$34, + "deco-sites/mira-site/sections/Layout/GridItem.tsx": $$$$$$35, + "deco-sites/mira-site/sections/Links/LinkTree.tsx": $$$$$$36, + "deco-sites/mira-site/sections/Links/Shortcuts.tsx": $$$$$$37, + "deco-sites/mira-site/sections/Miscellaneous/CampaignTimer.tsx": $$$$$$38, + "deco-sites/mira-site/sections/Miscellaneous/CookieConsent.tsx": $$$$$$39, + "deco-sites/mira-site/sections/Miscellaneous/Slide.tsx": $$$$$$40, + "deco-sites/mira-site/sections/Newsletter/Newsletter.tsx": $$$$$$41, + "deco-sites/mira-site/sections/Product/ImageGalleryFrontBack.tsx": $$$$$$42, + "deco-sites/mira-site/sections/Product/ImageGallerySlider.tsx": $$$$$$43, + "deco-sites/mira-site/sections/Product/NotFound.tsx": $$$$$$44, + "deco-sites/mira-site/sections/Product/NotFoundChallenge.tsx": $$$$$$45, + "deco-sites/mira-site/sections/Product/ProductInfo.tsx": $$$$$$46, + "deco-sites/mira-site/sections/Product/ProductShelf.tsx": $$$$$$47, + "deco-sites/mira-site/sections/Product/ProductShelfTabbed.tsx": $$$$$$48, + "deco-sites/mira-site/sections/Product/SearchResult.tsx": $$$$$$49, + "deco-sites/mira-site/sections/Product/ShelfWithImage.tsx": $$$$$$50, + "deco-sites/mira-site/sections/Product/Wishlist.tsx": $$$$$$51, + "deco-sites/mira-site/sections/Social/InstagramPosts.tsx": $$$$$$52, + "deco-sites/mira-site/sections/Social/WhatsApp.tsx": $$$$$$53, + "deco-sites/mira-site/sections/Theme/Theme.tsx": $$$$$$54, }, "apps": { "deco-sites/mira-site/apps/decohub.ts": $$$$$$$$$$$0, diff --git a/sections/Content/Pillars.tsx b/sections/Content/Pillars.tsx new file mode 100644 index 0000000..7261442 --- /dev/null +++ b/sections/Content/Pillars.tsx @@ -0,0 +1,44 @@ +import Accordion from "$store/components/daisy/Accordion.tsx"; + +export interface AccordionItems { + title: string; + description: string; +} + +export interface Props { + title?: string; + description?: string; + accordionItems: AccordionItems[]; +} + +const accordionExample = { + title: "RECLAMAR AGIR", + description: + "Qual é a ação prática que eu posso tomar para abrir mão da reclamação persistente que tenho tido?", +}; + +export default function Pillars( + { + title = "OS PILARES DO MÉTODO MIRA", + description = + "Leia nossos 8 pilares e descubra o que é preciso para viver em alto desempenho.", + accordionItems = Array(7).fill(0).map(() => accordionExample), + }: Props, +) { + return ( +
+
+

+ {title} +

+ +

+ {description} +

+
+ +
+ ); +} From cc22ac44b12c01debe38790658b415869a184180 Mon Sep 17 00:00:00 2001 From: renan04lima Date: Mon, 4 Mar 2024 20:47:51 -0300 Subject: [PATCH 2/2] fix: text color and font --- components/daisy/Accordion.tsx | 4 ++-- sections/Content/Pillars.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/daisy/Accordion.tsx b/components/daisy/Accordion.tsx index ee23ee3..a858473 100644 --- a/components/daisy/Accordion.tsx +++ b/components/daisy/Accordion.tsx @@ -3,8 +3,8 @@ export interface Props { } interface Child { - title: string; - description: string; + title?: string; + description?: string; } export default function Accordion(props: Props) { diff --git a/sections/Content/Pillars.tsx b/sections/Content/Pillars.tsx index 7261442..9487a4c 100644 --- a/sections/Content/Pillars.tsx +++ b/sections/Content/Pillars.tsx @@ -1,14 +1,14 @@ import Accordion from "$store/components/daisy/Accordion.tsx"; export interface AccordionItems { - title: string; - description: string; + title?: string; + description?: string; } export interface Props { title?: string; description?: string; - accordionItems: AccordionItems[]; + accordionItems?: AccordionItems[]; } const accordionExample = { @@ -26,13 +26,13 @@ export default function Pillars( }: Props, ) { return ( -
+

{title}

-

+

{description}