import * as React from "react"; import { get } from "lodash"; import { style } from "./style"; import { default as defaultData } from "./data.json"; import { doIShow, combineData } from "../../utils"; import { Block, Section, Headline, Text, Container, Button, Grid, GridItem, FormField, } from "@sc/plugins/webcomponents/v2"; import { ImagePlaceholder, ImagePlaceholderTypes } from "../../Placeholders"; type LayoutProps = { data: any; }; const Layout: React.FC = ({ data }) => { const initialContent = { main_headline: { html: "Headline Goes Here", }, sub_headline: { html: "Sub Headline Text Content Goes Here", }, }; const content = combineData(initialContent, defaultData, data); return (
{doIShow(content, "main_headline") && ( {get(content, "main_headline.html", "...")} )} {doIShow(content, "sub_headline") && ( {get(content, "sub_headline.html", "...")} )} {doIShow(content, "input") && ( )} {doIShow(content, "cta_button") && (
); }; export default Layout;