diff --git a/app/components/BackgroundImage.tsx b/app/components/BackgroundImage.tsx index 5c4913eb..f191d4ae 100644 --- a/app/components/BackgroundImage.tsx +++ b/app/components/BackgroundImage.tsx @@ -7,7 +7,7 @@ import type { import type { CSSProperties } from "react"; export type BackgroundImageProps = { - backgroundImage?: WeaverseImage; + backgroundImage?: WeaverseImage | string; backgroundFit?: CSSProperties["objectFit"]; backgroundPosition?: PositionInputValue; }; @@ -15,10 +15,14 @@ export type BackgroundImageProps = { export function BackgroundImage(props: BackgroundImageProps) { let { backgroundImage, backgroundFit, backgroundPosition } = props; if (backgroundImage) { + let data = + typeof backgroundImage === "string" + ? { url: backgroundImage, altText: "Section background" } + : backgroundImage; return ( { text: string; link?: string; openInNewTab?: boolean; + buttonStyle: "inherit" | "custom"; + backgroundColor?: string; + textColor?: string; + borderColor?: string; + backgroundColorHover?: string; + textColorHover?: string; + borderColorHover?: string; } let variants = cva( @@ -45,7 +53,10 @@ let variants = cva( }, ); -interface Props extends ButtonProps, Partial {} +interface Props + extends ButtonProps, + Omit, "children">, + Partial {} let Button = forwardRef((props, ref) => { let { @@ -57,15 +68,35 @@ let Button = forwardRef((props, ref) => { link, openInNewTab, className, + buttonStyle, + backgroundColor, + textColor, + borderColor, + backgroundColorHover, + textColorHover, + borderColorHover, + style = {}, ...rest } = props; + if (buttonStyle === "custom") { + style = { + ...style, + "--color-button-bg": backgroundColor, + "--color-button-text": textColor, + "--color-button-border": borderColor, + "--color-button-bg-hover": backgroundColorHover, + "--color-button-text-hover": textColorHover, + "--color-button-border-hover": borderColorHover, + } as React.CSSProperties; + } if (link) { return ( } + style={style} {...rest} - className={clsx(variants({ variant: variant, className }))} + className={clsx(variants({ variant, className }))} to={link || "/"} target={openInNewTab ? "_blank" : "_self"} rel="noreferrer" @@ -77,9 +108,10 @@ let Button = forwardRef((props, ref) => { return ( @@ -123,6 +155,64 @@ export let buttonInputs: InspectorGroup["inputs"] = [ }, defaultValue: "primary", }, + { + type: "heading", + label: "Styles", + }, + { + type: "select", + name: "buttonStyle", + label: "Button style", + configs: { + options: [ + { label: "Inherit", value: "inherit" }, + { label: "Custom", value: "custom" }, + ], + }, + defaultValue: "inherit", + }, + { + type: "color", + label: "Background color", + name: "backgroundColor", + defaultValue: "#000", + condition: "buttonStyle.eq.custom", + }, + { + type: "color", + label: "Text color", + name: "textColor", + defaultValue: "#fff", + condition: "buttonStyle.eq.custom", + }, + { + type: "color", + label: "Border color", + name: "borderColor", + defaultValue: "#00000000", + condition: "buttonStyle.eq.custom", + }, + { + type: "color", + label: "Background color (hover)", + name: "backgroundColorHover", + defaultValue: "#00000000", + condition: "buttonStyle.eq.custom", + }, + { + type: "color", + label: "Text color (hover)", + name: "textColorHover", + defaultValue: "#000", + condition: "buttonStyle.eq.custom", + }, + { + type: "color", + label: "Border color (hover)", + name: "borderColorHover", + defaultValue: "#000", + condition: "buttonStyle.eq.custom", + }, ]; export let schema: HydrogenComponentSchema = { diff --git a/app/components/Overlay.tsx b/app/components/Overlay.tsx index 0293f92c..8b791f64 100644 --- a/app/components/Overlay.tsx +++ b/app/components/Overlay.tsx @@ -23,10 +23,6 @@ export function Overlay({ enable, color, opacity }: OverlayProps) { } export let overlayInputs: InspectorGroup["inputs"] = [ - { - type: "heading", - label: "Overlay", - }, { type: "switch", name: "enableOverlay", diff --git a/app/components/Description.tsx b/app/components/Paragraph.tsx similarity index 72% rename from app/components/Description.tsx rename to app/components/Paragraph.tsx index 67b2cd97..0e3f7366 100644 --- a/app/components/Description.tsx +++ b/app/components/Paragraph.tsx @@ -2,36 +2,38 @@ import { type HydrogenComponentProps, type HydrogenComponentSchema, } from "@weaverse/hydrogen"; +import type { VariantProps } from "class-variance-authority"; +import { cva } from "class-variance-authority"; import { clsx } from "clsx"; import { forwardRef } from "react"; -import type { Alignment } from "~/lib/type"; - -type DescriptionProps = HydrogenComponentProps & { - content: string; +export interface ParagraphProps extends VariantProps { as?: "p" | "div"; + content: string; color?: string; - width?: Width; - alignment?: Alignment; className?: string; -}; - -type Width = "full" | "narrow"; - -let widthClasses: Record = { - full: "w-full mx-auto", - narrow: "w-full md:w-1/2 lg:w-3/4 max-w-4xl mx-auto", -}; +} -let alignmentClasses: Record = { - left: "text-left", - center: "text-center", - right: "text-right", -}; +let variants = cva("paragraph", { + variants: { + width: { + full: "w-full mx-auto", + narrow: "w-full md:w-1/2 lg:w-3/4 max-w-4xl mx-auto", + }, + alignment: { + left: "text-left", + center: "text-center", + right: "text-right", + }, + }, + defaultVariants: { + width: "full", + }, +}); -let Description = forwardRef< +let Paragraph = forwardRef< HTMLParagraphElement | HTMLDivElement, - DescriptionProps + ParagraphProps & HydrogenComponentProps >((props, ref) => { let { as: Tag = "p", @@ -47,33 +49,21 @@ let Description = forwardRef< ref={ref} {...rest} style={{ color }} - className={clsx( - widthClasses[width!], - alignmentClasses[alignment!], - className, - )} + className={clsx(variants({ width, alignment, className }))} suppressHydrationWarning dangerouslySetInnerHTML={{ __html: content }} /> ); }); -Description.defaultProps = { - as: "p", - width: "narrow", - content: - "Pair large text with an image or full-width video to showcase your brand's lifestyle to describe and showcase an important detail of your products that you can tag on your image.", - alignment: "center", -}; - -export default Description; +export default Paragraph; export let schema: HydrogenComponentSchema = { - type: "description", - title: "Description", + type: "paragraph", + title: "Paragraph", inspector: [ { - group: "Description", + group: "Paragraph", inputs: [ { type: "select", diff --git a/app/components/Section.tsx b/app/components/Section.tsx index 7e07ec16..bb3c1b04 100644 --- a/app/components/Section.tsx +++ b/app/components/Section.tsx @@ -12,7 +12,6 @@ import { Overlay, overlayInputs } from "./Overlay"; export type SectionWidth = "full" | "stretch" | "fixed"; export type VerticalPadding = "none" | "small" | "medium" | "large"; export type DividerType = "none" | "top" | "bottom" | "both"; -export type SectionAlignment = "unset" | "left" | "center" | "right"; export type SectionProps = HydrogenComponentProps & HTMLAttributes & @@ -21,7 +20,6 @@ export type SectionProps = HydrogenComponentProps & as: React.ElementType; width: SectionWidth; gap: number; - contentAlignment: SectionAlignment; className: string; verticalPadding: VerticalPadding; divider: DividerType; @@ -32,6 +30,7 @@ export type SectionProps = HydrogenComponentProps & backgroundColor: string; backgroundFor: "section" | "content"; children: React.ReactNode; + containerClassName: string; }>; export let gapClasses: Record = { @@ -72,19 +71,11 @@ export let widthClasses: Record = { fixed: "w-full h-full max-w-[var(--page-width,1280px)] mx-auto", }; -export let alignmentClasses: Record = { - unset: "", - left: "text-left", - center: "text-center", - right: "text-right", -}; - export let Section = forwardRef((props, ref) => { let { as: Component = "section", width, gap, - contentAlignment, divider, verticalPadding, borderRadius, @@ -98,10 +89,13 @@ export let Section = forwardRef((props, ref) => { overlayOpacity, className, children, + containerClassName, style = {}, ...rest } = props; + let isBackgroundForContent = backgroundFor === "content"; + return ( <> {(divider === "top" || divider === "both") && } @@ -115,11 +109,11 @@ export let Section = forwardRef((props, ref) => { )} style={{ ...style, - backgroundColor: backgroundFor === "section" ? backgroundColor : "", - borderRadius: backgroundFor === "section" ? borderRadius : "", + backgroundColor: !isBackgroundForContent ? backgroundColor : "", + borderRadius: !isBackgroundForContent ? borderRadius : "", }} > - {backgroundFor === "section" && ( + {!isBackgroundForContent && ( <> ((props, ref) => { widthClasses[width!], gapClasses[gap!], verticalPaddingClasses[verticalPadding!], - alignmentClasses[contentAlignment!], + containerClassName, )} style={{ - backgroundColor: backgroundFor === "content" ? backgroundColor : "", - borderRadius: backgroundFor === "content" ? borderRadius : "", + backgroundColor: isBackgroundForContent ? backgroundColor : "", + borderRadius: isBackgroundForContent ? borderRadius : "", }} > - {backgroundFor === "content" && ( + {isBackgroundForContent && ( <> & { type ProductRequiredFields = Pick< Product, - "title" | "description" | "vendor" | "seo" + "title" | "paragraph" | "vendor" | "seo" > & { variants: { nodes: Array< diff --git a/app/sections/SlideShow/SlideItems.tsx b/app/sections/SlideShow/SlideItems.tsx index 1150b95d..36ae1cdf 100644 --- a/app/sections/SlideShow/SlideItems.tsx +++ b/app/sections/SlideShow/SlideItems.tsx @@ -121,7 +121,7 @@ export let schema: HydrogenComponentSchema = { ], }, ], - childTypes: ["subheading", "heading", "description", "button"], + childTypes: ["subheading", "heading", "paragraph", "button"], presets: { children: [ { @@ -133,7 +133,7 @@ export let schema: HydrogenComponentSchema = { content: "Slide Heading", }, { - type: "description", + type: "paragraph", content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown.", }, diff --git a/app/sections/columns-with-images/index.tsx b/app/sections/columns-with-images/index.tsx index b30a6fd5..8cef2dce 100644 --- a/app/sections/columns-with-images/index.tsx +++ b/app/sections/columns-with-images/index.tsx @@ -22,12 +22,12 @@ export let schema: HydrogenComponentSchema = { type: "columns-with-images", title: "Columns with images", toolbar: ["general-settings", ["duplicate", "delete"]], - inspector: [sectionInspector], + inspector: sectionInspector, childTypes: [ "columns-with-images--items", "subheading", "heading", - "description", + "paragraph", ], presets: { gap: 48, diff --git a/app/sections/countdown/index.tsx b/app/sections/countdown/index.tsx index ef9c98a5..90e95cab 100644 --- a/app/sections/countdown/index.tsx +++ b/app/sections/countdown/index.tsx @@ -8,7 +8,7 @@ type CountdownProps = SectionProps; let Countdown = forwardRef((props, ref) => { let { children, ...rest } = props; return ( -
+
{children}
); @@ -20,7 +20,7 @@ export let schema: HydrogenComponentSchema = { type: "countdown", title: "Countdown", toolbar: ["general-settings", ["duplicate", "delete"]], - inspector: [sectionInspector], + inspector: sectionInspector, childTypes: ["heading", "subheading", "countdown--timer", "button"], presets: { children: [ diff --git a/app/sections/countdown/timer.tsx b/app/sections/countdown/timer.tsx index 431bcba3..8c166270 100644 --- a/app/sections/countdown/timer.tsx +++ b/app/sections/countdown/timer.tsx @@ -63,35 +63,35 @@ let CountdownTimer = forwardRef<
-
+
{remainingTime?.days || 0}
-
Days
+
Days
-
+
{remainingTime?.hours || 0}
-
hours
+
hours
-
+
{remainingTime?.minutes || 0}
-
minutes
+
minutes
-
+
{remainingTime?.seconds || 0}
-
seconds
+
seconds
); diff --git a/app/sections/hero-image/index.tsx b/app/sections/hero-image/index.tsx index efd03d4f..e261f348 100644 --- a/app/sections/hero-image/index.tsx +++ b/app/sections/hero-image/index.tsx @@ -1,80 +1,67 @@ -import type { - HydrogenComponentProps, - HydrogenComponentSchema, - WeaverseImage, +import { + IMAGES_PLACEHOLDERS, + type HydrogenComponentSchema, } from "@weaverse/hydrogen"; -import type { CSSProperties } from "react"; -import { forwardRef } from "react"; +import type { VariantProps } from "class-variance-authority"; +import { cva } from "class-variance-authority"; import clsx from "clsx"; -import { Image } from "@shopify/hydrogen"; +import { forwardRef } from "react"; +import { backgroundInputs } from "~/components/BackgroundImage"; +import { overlayInputs } from "~/components/Overlay"; +import type { SectionProps } from "~/components/Section"; +import { Section, layoutInputs } from "~/components/Section"; -import { IconImageBlank } from "~/modules"; +export interface HeroImageProps extends VariantProps {} -type HeroImageProps = HydrogenComponentProps & { - backgroundImage: WeaverseImage; - contentAlignment: string; - enableOverlay: boolean; - overlayColor: string; - overlayOpacity: number; - sectionHeightDesktop: number; - sectionHeightMobile: number; -}; - -let HeroImage = forwardRef((props, ref) => { - let { - backgroundImage, - contentAlignment, - enableOverlay, - overlayColor, - overlayOpacity, - sectionHeightDesktop, - sectionHeightMobile, - children, - ...rest - } = props; - let sectionStyle: CSSProperties = { - justifyContent: `${contentAlignment}`, - "--section-height-desktop": `${sectionHeightDesktop}px`, - "--section-height-mobile": `${sectionHeightMobile}px`, - "--overlay-opacity": `${overlayOpacity}%`, - "--overlay-color": `${overlayColor}`, - "--max-width-content": "600px", - } as CSSProperties; +let variants = cva("", { + variants: { + height: { + small: "min-h-[375px] sm:min-h-[400px] lg:min-h-[440px]", + medium: "min-h-[480px] sm:min-h-[460px] lg:min-h-[500px]", + large: "min-h-[560px] sm:min-h-[560px] lg:min-h-[640px]", + full: "h-screen-no-nav", + }, + contentPosition: { + "top left": "justify-start items-start [&_.paragraph]:[text-align:left]", + "top center": + "justify-start items-center [&_.paragraph]:[text-align:center]", + "top right": "justify-start items-end [&_.paragraph]:[text-align:right]", + "center left": + "justify-center items-start [&_.paragraph]:[text-align:left]", + "center center": + "justify-center items-center [&_.paragraph]:[text-align:center]", + "center right": + "justify-center items-end [&_.paragraph]:[text-align:right]", + "bottom left": "justify-end items-start [&_.paragraph]:[text-align:left]", + "bottom center": + "justify-end items-center [&_.paragraph]:[text-align:center]", + "bottom right": "justify-end items-end [&_.paragraph]:[text-align:right]", + }, + }, + defaultVariants: { + height: "large", + contentPosition: "center center", + }, +}); - return ( -
-
- {backgroundImage ? ( - - ) : ( -
- -
+let HeroImage = forwardRef( + (props, ref) => { + let { children, height, contentPosition, ...rest } = props; + return ( +
- )} -
-
+ > {children} -
-
- ); -}); + + ); + }, +); export default HeroImage; @@ -84,97 +71,70 @@ export let schema: HydrogenComponentSchema = { toolbar: ["general-settings", ["duplicate", "delete"]], inspector: [ { - group: "Image", + group: "Layout", inputs: [ { - type: "image", - name: "backgroundImage", - label: "Background image", - }, - { - type: "toggle-group", - label: "Content alignment", - name: "contentAlignment", + type: "select", + name: "height", + label: "Section height", configs: { options: [ - { label: "Left", value: "flex-start" }, - { label: "Center", value: "center" }, - { label: "Right", value: "flex-end" }, + { value: "small", label: "Small" }, + { value: "medium", label: "Medium" }, + { value: "large", label: "Large" }, + { value: "full", label: "Fullscreen" }, ], }, - defaultValue: "center", - }, - { - type: "switch", - name: "enableOverlay", - label: "Enable overlay", - defaultValue: true, - }, - { - type: "color", - name: "overlayColor", - label: "Overlay color", - defaultValue: "#333333", - condition: `enableOverlay.eq.true`, - }, - { - type: "range", - name: "overlayOpacity", - label: "Overlay opacity", - defaultValue: 50, - configs: { - min: 10, - max: 100, - step: 10, - unit: "%", - }, - condition: `enableOverlay.eq.true`, }, { - type: "range", - name: "sectionHeightDesktop", - label: "Section height desktop", - defaultValue: 450, - configs: { - min: 400, - max: 700, - step: 10, - unit: "px", - }, - }, - { - type: "range", - name: "sectionHeightMobile", - label: "Section height mobile", - defaultValue: 350, - configs: { - min: 300, - max: 600, - step: 10, - unit: "px", - }, + type: "position", + name: "contentPosition", + label: "Content position", + defaultValue: "center center", }, + ...layoutInputs.filter( + (inp) => inp.name !== "divider" && inp.name !== "borderRadius", + ), + ], + }, + { + group: "Background", + inputs: [ + ...backgroundInputs.filter( + (inp) => + inp.name !== "backgroundFor" && inp.name !== "backgroundColor", + ), ], }, + { group: "Overlay", inputs: [...overlayInputs] }, ], - childTypes: ["subheading", "heading", "description", "button"], + childTypes: ["subheading", "heading", "paragraph", "button"], presets: { + height: "large", + contentPosition: "bottom left", + backgroundImage: IMAGES_PLACEHOLDERS.backgroundImage, + backgroundFit: "cover", + enableOverlay: true, + overlayOpacity: 35, children: [ { type: "subheading", content: "Subheading", + color: "#ffffff", }, { type: "heading", - content: "Heading for Image", - }, - { - type: "description", - content: "Pair large text with an image to tell a story.", + content: "Hero image with text overlay", + color: "#ffffff", + size: "scale", + minSize: 16, + maxSize: 56, }, { - type: "button", - content: "Button section", + type: "paragraph", + content: + "Use this text to share information about your brand with your customers. Describe a product, share announcements, or welcome customers to your store.", + color: "#ffffff", }, ], }, diff --git a/app/sections/video-hero/index.tsx b/app/sections/hero-video/index.tsx similarity index 94% rename from app/sections/video-hero/index.tsx rename to app/sections/hero-video/index.tsx index bb7e4663..126013c9 100644 --- a/app/sections/video-hero/index.tsx +++ b/app/sections/hero-video/index.tsx @@ -2,11 +2,10 @@ import type { HydrogenComponentSchema } from "@weaverse/hydrogen"; import clsx from "clsx"; import type { CSSProperties } from "react"; import { forwardRef, lazy, Suspense } from "react"; - import { overlayInputs } from "~/components/Overlay"; import { gapClasses } from "~/components/Section"; -type VideoHeroProps = { +type HeroVideoProps = { videoURL: string; gap: number; enableOverlay: boolean; @@ -16,6 +15,7 @@ type VideoHeroProps = { sectionHeightMobile: number; children: React.ReactNode; }; + let RP = lazy(() => import("react-player/lazy")); let ReactPlayer = (props: any) => ( @@ -24,7 +24,7 @@ let ReactPlayer = (props: any) => ( ); let FALLBACK_VIDEO = "https://www.youtube.com/watch?v=Su-x4Mo5xmU"; -let VideoHero = forwardRef((props, ref) => { +let HeroVideo = forwardRef((props, ref) => { let { videoURL, gap, @@ -88,11 +88,11 @@ let VideoHero = forwardRef((props, ref) => { ); }); -export default VideoHero; +export default HeroVideo; export let schema: HydrogenComponentSchema = { - type: "video-hero", - title: "Video hero", + type: "hero-video", + title: "Hero video", toolbar: ["general-settings", ["duplicate", "delete"]], inspector: [ { @@ -150,7 +150,7 @@ export let schema: HydrogenComponentSchema = { ], }, ], - childTypes: ["subheading", "heading", "description", "button"], + childTypes: ["subheading", "heading", "paragraph", "button"], presets: { enableOverlay: true, children: [ @@ -163,7 +163,7 @@ export let schema: HydrogenComponentSchema = { content: "Bring your brand to life.", }, { - type: "description", + type: "paragraph", content: "Pair large video with a compelling message to captivate your audience.", }, diff --git a/app/sections/hero.tsx b/app/sections/hero.tsx deleted file mode 100644 index 042111af..00000000 --- a/app/sections/hero.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import type { - ComponentLoaderArgs, - HydrogenComponentProps, - HydrogenComponentSchema, -} from "@weaverse/hydrogen"; -import { forwardRef } from "react"; - -import type { SeoCollectionContentQuery } from "storefrontapi.generated"; -import { Hero } from "~/modules/Hero"; -import { HOMEPAGE_SEO_QUERY } from "~/data/queries"; - -type HeroSectionData = { - collectionHandle: string; - height: "full"; - top: boolean; - loading: HTMLImageElement["loading"]; -}; - -let HeroSection = forwardRef< - HTMLElement, - HydrogenComponentProps>> & HeroSectionData ->((props, ref) => { - let { loaderData, height, loading, top, collectionHandle, ...rest } = props; - if (loaderData) { - return ( -
- -
- ); - } - return
; -}); - -export default HeroSection; - -export let loader = async (args: ComponentLoaderArgs) => { - let { weaverse, data } = args; - let { hero } = await weaverse.storefront.query( - HOMEPAGE_SEO_QUERY, - { - variables: { handle: data.collectionHandle || "frontpage" }, - }, - ); - return hero; -}; - -export let schema: HydrogenComponentSchema = { - type: "hero", - title: "Hero", - inspector: [ - { - group: "Hero", - inputs: [ - { - type: "collection", - name: "collectionHandle", - label: "Preview", - defaultValue: "frontpage", - }, - { - type: "toggle-group", - name: "loading", - label: "Background image loading", - defaultValue: "eager", - configs: { - options: [ - { label: "Eager", value: "eager", icon: "zap" }, - { - label: "Lazy", - value: "lazy", - icon: "loader", - weight: "light", - }, - ], - }, - helpText: - 'Learn more about image loading strategies.', - }, - { - type: "select", - name: "height", - label: "Height", - configs: { - options: [ - { label: "Auto", value: "auto" }, - { label: "Fullscreen", value: "full" }, - ], - }, - defaultValue: "auto", - }, - { - type: "switch", - name: "top", - label: "Top", - defaultValue: true, - helpText: - "Push the hero to the top of the page by adding a negative margin.", - }, - ], - }, - ], - toolbar: ["general-settings", ["duplicate", "delete"]], -}; diff --git a/app/sections/image-gallery/index.tsx b/app/sections/image-gallery/index.tsx index 53b9693f..1b17615b 100644 --- a/app/sections/image-gallery/index.tsx +++ b/app/sections/image-gallery/index.tsx @@ -20,8 +20,8 @@ export default ImageGallery; export let schema: HydrogenComponentSchema = { type: "image-gallery", title: "Image gallery", - childTypes: ["subheading", "heading", "description", "image-gallery--items"], - inspector: [sectionInspector], + childTypes: ["subheading", "heading", "paragraph", "image-gallery--items"], + inspector: sectionInspector, toolbar: ["general-settings", ["duplicate", "delete"]], presets: { children: [ @@ -30,7 +30,7 @@ export let schema: HydrogenComponentSchema = { content: "Image Gallery", }, { - type: "description", + type: "paragraph", content: "Showcase your chosen images. This visual focus will enhance user engagement and understanding of your offerings.", }, diff --git a/app/sections/image-gallery/items.tsx b/app/sections/image-gallery/items.tsx index 2c94f891..4a7903ac 100644 --- a/app/sections/image-gallery/items.tsx +++ b/app/sections/image-gallery/items.tsx @@ -16,7 +16,7 @@ let ImageGalleyItems = forwardRef(
{children} diff --git a/app/sections/image-with-text/content.tsx b/app/sections/image-with-text/content.tsx index 0f9ef1ad..97a35f3e 100644 --- a/app/sections/image-with-text/content.tsx +++ b/app/sections/image-with-text/content.tsx @@ -55,7 +55,7 @@ export let schema: HydrogenComponentSchema = { ], }, ], - childTypes: ["subheading", "heading", "description", "button"], + childTypes: ["subheading", "heading", "paragraph", "button"], presets: { children: [ { @@ -67,7 +67,7 @@ export let schema: HydrogenComponentSchema = { content: "Heading for image", }, { - type: "description", + type: "paragraph", content: "Pair large text with an image to tell a story.", }, { diff --git a/app/sections/promotion-grid/item.tsx b/app/sections/promotion-grid/item.tsx index eba88b0e..9722c818 100644 --- a/app/sections/promotion-grid/item.tsx +++ b/app/sections/promotion-grid/item.tsx @@ -61,12 +61,7 @@ export let schema: HydrogenComponentSchema = { ], }, ], - childTypes: [ - "subheading", - "heading", - "description", - "promotion-item--buttons", - ], + childTypes: ["subheading", "heading", "paragraph", "promotion-item--buttons"], presets: { children: [ { @@ -78,7 +73,7 @@ export let schema: HydrogenComponentSchema = { content: "Heading for Image", }, { - type: "description", + type: "paragraph", content: "Include the smaller details of your promotion in text below the title.", }, diff --git a/app/sections/testimonials/index.tsx b/app/sections/testimonials/index.tsx index 0627774f..5d3a0318 100644 --- a/app/sections/testimonials/index.tsx +++ b/app/sections/testimonials/index.tsx @@ -24,8 +24,8 @@ export default Testimonials; export let schema: HydrogenComponentSchema = { type: "testimonials", title: "Testimonials", - childTypes: ["subheading", "heading", "description", "testimonials-items"], - inspector: [sectionInspector], + childTypes: ["subheading", "heading", "paragraph", "testimonials-items"], + inspector: sectionInspector, toolbar: ["general-settings", ["duplicate", "delete"]], presets: { children: [ @@ -34,7 +34,7 @@ export let schema: HydrogenComponentSchema = { content: "See what our customers are saying", }, { - type: "description", + type: "paragraph", content: "We are a team of passionate people whose goal is to improve everyone's life through disruptive products. We build great products to solve your business problems.", }, diff --git a/app/sections/user-profiles/index.tsx b/app/sections/user-profiles/index.tsx index 2cd918a0..513e84e0 100644 --- a/app/sections/user-profiles/index.tsx +++ b/app/sections/user-profiles/index.tsx @@ -17,7 +17,7 @@ const UserCard = ({ user }: { user: any }) => { let name = fields.find((field: any) => field.key === "name")?.value; let role = fields.find((field: any) => field.key === "role")?.value; let description = fields.find( - (field: any) => field.key === "description", + (field: any) => field.key === "paragraph", )?.value; return (
)", // background inverse color body: "rgb(var(--color-text) / )", // body text color "inv-body": "rgb(var(--color-inverse-text) / )", // body text inverse color - btn: "rgb(var(--color-button) / )", // button background color - "btn-content": "rgb(var(--color-button-text) / )", // button text color - "inv-btn": "rgb(var(--color-inverse-button) / )", // button inverse background color - "inv-btn-content": - "rgb(var(--color-inverse-button-text) / )", // button inverse text color + // btn: "rgb(var(--color-button) / )", // button background color + // "btn-content": "rgb(var(--color-button-text) / )", // button text color + // "inv-btn": "rgb(var(--color-inverse-button) / )", // button inverse background color + // "inv-btn-content": + // "rgb(var(--color-inverse-button-text) / )", // button inverse text color sale: "rgb(var(--color-sale) / )", // sale background color bar: "rgb(var(--color-border) / )", // border color },