import * as React from "react"; import { action } from "@storybook/addon-actions"; import { withKnobs, text, boolean, select } from "@storybook/addon-knobs"; import { EditorObjectState } from "@sc/modules/v2/Editor/components/EditorObject/types"; import { PageSectionCategory } from "@sc/plugins/misc/v2/blocks/weblayouts/types"; import { sampleContentData, EditorWithCustomData, } from "@sc/modules/page/Builder/Builder.stories"; import { BODY } from "@sc/modules/v2/Editor/types"; import settings from "@sc/plugins/webcomponents/v2/Section/settings"; import SectionsLegend from "./SectionsLegend"; import SectionItem from "./SectionItem"; export default { title: "Plugins|Page Sections/SectionsLegend", component: SectionsLegend, subcomponents: { SectionItem }, excludeStories: /.*Data$/, }; export const sectionsData = [ { id: "HEADER", label: "Header", type: PageSectionCategory.HEADER, }, { id: "BENEFIT", label: "Benefit", type: PageSectionCategory.BENEFIT, settings: { state: EditorObjectState.ACTIVE }, }, { id: "CTA", label: "Cta", type: PageSectionCategory.CTA }, { id: "CONTENT", label: "Content", type: PageSectionCategory.CONTENT, }, { id: "PRICING", label: "Pricing", type: PageSectionCategory.PRICING, }, { id: "SOCIALPROOF", label: "Socialproof", type: PageSectionCategory.SOCIALPROOF, settings: { state: EditorObjectState.HOVER }, }, { id: "FORM", label: "Form", type: PageSectionCategory.FORM }, { id: "NAVIGATION", label: "Navigation", type: PageSectionCategory.NAVIGATION, }, { id: "FOOTER", label: "Footer", type: PageSectionCategory.FOOTER, }, { id: "GUARANTEE", label: "Guarantee", type: PageSectionCategory.GUARANTEE, }, { id: "QUIZ", label: "Quiz", type: PageSectionCategory.QUIZ }, { id: "URGENCY", label: "Urgency", type: PageSectionCategory.URGENCY, }, ]; export const Default: any = () => { return ( console.log(e)} /> ); }; Default.story = { parameters: { jest: ["SectionsLegend"], }, }; export const JustSectionItem: any = () => ( action("Clicked")} label="Name of the Section" /> ); JustSectionItem.story = { parameters: { jest: ["SectionItem"], }, }; export const InTheEditor: React.FC = () => { const containerId = "u5j1r64m5rf"; return ( itm.id !== containerId), ]} /> ); };