diff --git a/cypress/e2e/slices/00-create.cy.js b/cypress/e2e/slices/00-create.cy.js index 2c4ae05ce0..db119e44ac 100644 --- a/cypress/e2e/slices/00-create.cy.js +++ b/cypress/e2e/slices/00-create.cy.js @@ -31,8 +31,7 @@ describe("Create Slices", () => { // add a variation - cy.get("button").contains("Default").click(); - cy.contains("+ Add new variation").click(); + cy.contains("button", "Add a new variation").click(); cy.getInputByLabel("Variation name*").type("foo"); cy.getInputByLabel("Variation ID*").clear(); @@ -47,20 +46,12 @@ describe("Create Slices", () => { "contain", "Save your work in order to simulate", ); - cy.contains("button", "Update screenshot").should("have.attr", "disabled"); - cy.contains("button", "Update screenshot").realHover(); - cy.get("#update-screenshot-button-tooltip").should("be.visible"); - cy.get("#update-screenshot-button-tooltip").should( - "contain", - "Save your work in order to update the screenshot", - ); cy.location("pathname", { timeout: 20000 }).should( "eq", `/slices/${lib}/${sliceName}/bar`, ); - cy.get("button").contains("foo").click(); - cy.contains("Default").click(); + cy.contains("a", "Default").click(); cy.location("pathname", { timeout: 20000 }).should( "eq", `/slices/${lib}/${sliceName}/default`, @@ -69,10 +60,6 @@ describe("Create Slices", () => { cy.contains("Save").click(); cy.contains("button", "Simulate").should("not.have.attr", "disabled"); - cy.contains("button", "Update screenshot").should( - "not.have.attr", - "disabled", - ); // simulator diff --git a/cypress/e2e/user-flows/scenario_custom_screenshots.cy.js b/cypress/e2e/user-flows/scenario_custom_screenshots.cy.js index cbdbf1068f..a683cc6869 100644 --- a/cypress/e2e/user-flows/scenario_custom_screenshots.cy.js +++ b/cypress/e2e/user-flows/scenario_custom_screenshots.cy.js @@ -71,11 +71,13 @@ describe("I am an existing SM user and I want to upload screenshots on variation }); it("Error displayed when non-image files are uploaded", () => { + const variationName = "Error handling"; + sliceBuilder.goTo(slice.library, slice.name); - sliceBuilder.addVariation("Error handling"); + sliceBuilder.addVariation(variationName); sliceBuilder.save(); - sliceBuilder.openScreenshotModal(); + new SliceCard(slice.name, variationName).openScreenshotModal(); cy.contains("Select file").selectFile( { contents: Cypress.Buffer.from("this is not an image"), diff --git a/cypress/helpers/slices.js b/cypress/helpers/slices.js index c68da17d05..81443d7573 100644 --- a/cypress/helpers/slices.js +++ b/cypress/helpers/slices.js @@ -121,7 +121,6 @@ function addFieldToSlice(elements, fieldType, fieldName, fieldId) { * @param {string} variationName Name of the variation. */ export function addVariationToSlice(variationName) { - sliceBuilder.variationsDropdown.click({ force: true }); sliceBuilder.addVariationButton.click(); addVariationModal.root.within(() => { diff --git a/cypress/pages/slices/sliceBuilder.js b/cypress/pages/slices/sliceBuilder.js index c12ecbaa60..9780748f9e 100644 --- a/cypress/pages/slices/sliceBuilder.js +++ b/cypress/pages/slices/sliceBuilder.js @@ -35,12 +35,8 @@ class SliceBuilder extends BaseBuilder { return cy.get("[data-cy=add-Repeatable-field]"); } - get variationsDropdown() { - return cy.get("[aria-label='Expand variations']"); - } - get addVariationButton() { - return cy.contains("button", "Add new variation"); + return cy.contains("button", "Add a new variation"); } goTo(sliceLibrary, sliceName, variation = "default") { @@ -50,17 +46,6 @@ class SliceBuilder extends BaseBuilder { return this; } - openScreenshotModal() { - cy.contains("Update screenshot").click(); - return this; - } - - openVariationModal() { - cy.get("[aria-label='Expand variations']").parent().click(); - cy.contains("Add new variation").click(); - return this; - } - changeToVariation(startVariation, targetVariation) { cy.get("button").contains(startVariation).click(); cy.contains(targetVariation).click(); @@ -103,8 +88,7 @@ class SliceBuilder extends BaseBuilder { * @param {string} variationName Name of the variation. */ addVariation(variationName) { - cy.get("[aria-label='Expand variations']").click({ force: true }); - cy.contains("button", "Add new variation").click(); + cy.contains("button", "Add a new variation").click(); cy.get("[aria-modal]").within(() => { cy.getInputByLabel("Variation name*").type(variationName); diff --git a/cypress/pages/slices/sliceCard.js b/cypress/pages/slices/sliceCard.js index 435fa4507c..04723918de 100644 --- a/cypress/pages/slices/sliceCard.js +++ b/cypress/pages/slices/sliceCard.js @@ -1,6 +1,9 @@ export class SliceCard { - constructor(sliceName) { - this.root = `[aria-label="${sliceName} slice card"]`; + constructor(sliceName, variationName) { + this.root = + variationName !== undefined + ? `[aria-label="${sliceName} ${variationName} slice card"]` + : `[aria-label^="${sliceName}"][aria-label$="slice card"]`; } get content() { @@ -12,7 +15,8 @@ export class SliceCard { } openScreenshotModal() { - cy.get(this.root).contains("Update screenshot").click(); + cy.get(this.root).find('[aria-haspopup="menu"]').click(); + cy.contains("Update screenshot").click(); return this; } } diff --git a/packages/slice-machine/components/ScreenshotPreview/index.tsx b/packages/slice-machine/components/ScreenshotPreview/index.tsx index b4b2b79264..086cd7ff95 100644 --- a/packages/slice-machine/components/ScreenshotPreview/index.tsx +++ b/packages/slice-machine/components/ScreenshotPreview/index.tsx @@ -9,11 +9,9 @@ const MemoedImage = memo<{ src: string | undefined }>(({ src }) => ( interface ScreenshotPreviewProps { src?: string; sx: { height: string | number } & ThemeUIStyleObject; - hideMissingWarning?: boolean; } export const ScreenshotPreview: React.FC = ({ - hideMissingWarning = false, src, sx, }) => { @@ -32,23 +30,19 @@ export const ScreenshotPreview: React.FC = ({ ...sx, }} > - {hideMissingWarning ? null : ( - <> - {src !== undefined ? ( - - ) : ( - - - You have no screenshot yet. - - )} - + {src !== undefined ? ( + + ) : ( + + + You have no screenshot yet. + )} ); diff --git a/packages/slice-machine/lib/builders/SliceBuilder/Header/VariationsPopover/MenuList.tsx b/packages/slice-machine/components/Simulator/components/Header/VariationsPopover/MenuList.tsx similarity index 100% rename from packages/slice-machine/lib/builders/SliceBuilder/Header/VariationsPopover/MenuList.tsx rename to packages/slice-machine/components/Simulator/components/Header/VariationsPopover/MenuList.tsx diff --git a/packages/slice-machine/lib/builders/SliceBuilder/Header/VariationsPopover/index.tsx b/packages/slice-machine/components/Simulator/components/Header/VariationsPopover/index.tsx similarity index 100% rename from packages/slice-machine/lib/builders/SliceBuilder/Header/VariationsPopover/index.tsx rename to packages/slice-machine/components/Simulator/components/Header/VariationsPopover/index.tsx diff --git a/packages/slice-machine/components/Simulator/components/Header/index.tsx b/packages/slice-machine/components/Simulator/components/Header/index.tsx index 2f525d496f..f1c5cbe958 100644 --- a/packages/slice-machine/components/Simulator/components/Header/index.tsx +++ b/packages/slice-machine/components/Simulator/components/Header/index.tsx @@ -1,16 +1,15 @@ import router from "next/router"; import { Text, Flex, Switch, Label } from "theme-ui"; -import VarationsPopover from "@lib/builders/SliceBuilder/Header/VariationsPopover"; -import { ComponentUI } from "@lib/models/common/ComponentUI"; - import { Button } from "@components/Button"; +import VariationsPopover from "@components/Simulator/components/Header/VariationsPopover"; +import * as Links from "@components/Simulator/components/Header/links"; import SliceMachineLogo from "@src/icons/SliceMachineLogo"; import { useSelector } from "react-redux"; import { selectSavingMock } from "@src/modules/simulator"; -import * as Links from "@lib/builders/SliceBuilder/links"; import { SliceMachineStoreType } from "@src/redux/type"; +import { ComponentUI } from "@lib/models/common/ComponentUI"; import { VariationSM } from "@lib/models/common/Slice"; const redirect = ( @@ -80,7 +79,7 @@ const Header: React.FunctionComponent = ({ > {slice.model.name} - redirect(slice, v, true)} diff --git a/packages/slice-machine/lib/builders/SliceBuilder/links.ts b/packages/slice-machine/components/Simulator/components/Header/links.ts similarity index 100% rename from packages/slice-machine/lib/builders/SliceBuilder/links.ts rename to packages/slice-machine/components/Simulator/components/Header/links.ts diff --git a/packages/slice-machine/lib/builders/SliceBuilder/FieldZones/index.tsx b/packages/slice-machine/lib/builders/SliceBuilder/FieldZones/index.tsx index 98165959f7..1fb204e5bd 100644 --- a/packages/slice-machine/lib/builders/SliceBuilder/FieldZones/index.tsx +++ b/packages/slice-machine/lib/builders/SliceBuilder/FieldZones/index.tsx @@ -1,5 +1,3 @@ -import { Box } from "theme-ui"; - import { ensureDnDDestination } from "@lib/utils"; import { transformKeyAccessor } from "@utils/str"; @@ -10,6 +8,7 @@ import * as Widgets from "@lib/models/common/widgets"; import sliceBuilderWidgetsArray from "@lib/models/common/widgets/sliceBuilderArray"; import { DropResult } from "react-beautiful-dnd"; +import { List } from "@src/components/List"; import useSliceMachineActions from "@src/modules/useSliceMachineActions"; import { VariationSM, WidgetsArea } from "@lib/models/common/Slice"; @@ -118,7 +117,7 @@ const FieldZones: React.FunctionComponent = ({ }; return ( - <> + = ({ dataCy="slice-non-repeatable-zone" isRepeatableCustomType={undefined} /> - = ({ dataCy="slice-repeatable-zone" isRepeatableCustomType={undefined} /> - + ); }; diff --git a/packages/slice-machine/lib/builders/SliceBuilder/Header/index.tsx b/packages/slice-machine/lib/builders/SliceBuilder/Header/index.tsx deleted file mode 100644 index 1203c6ff99..0000000000 --- a/packages/slice-machine/lib/builders/SliceBuilder/Header/index.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import React, { useState } from "react"; -import { Box, Flex, Text } from "theme-ui"; -import VariationModal from "./VariationModal"; -import { useRouter } from "next/router"; -import * as Links from "../links"; -import VariationPopover from "./VariationsPopover"; -import useSliceMachineActions from "@src/modules/useSliceMachineActions"; -import { VariationSM } from "@lib/models/common/Slice"; -import { ComponentUI } from "@lib/models/common/ComponentUI"; -import { ModelStatus } from "@lib/models/common/ModelStatus"; - -const Header: React.FC<{ - component: ComponentUI; - status: ModelStatus; - variation: VariationSM; - imageLoading?: boolean; -}> = ({ component, variation }) => { - const router = useRouter(); - const [showVariationModal, setShowVariationModal] = useState(false); - - const { copyVariationSlice } = useSliceMachineActions(); - - return ( - <> - - setShowVariationModal(true)} - onChange={(v) => - void router.push( - ...Links.variation({ - lib: component.href, - sliceName: component.model.name, - variationId: v.id, - }).all, - ) - } - /> - - Variation id : {variation.id} - - - - setShowVariationModal(false)} - onSubmit={(id, name, copiedVariation) => { - copyVariationSlice(id, name, copiedVariation); - void router.push( - ...Links.variation({ - lib: component.href, - sliceName: component.model.name, - variationId: id, - }).all, - ); - }} - initialVariation={variation} - variations={component.model.variations} - /> - - ); -}; -export default Header; diff --git a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/prismic.svg b/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/prismic.svg deleted file mode 100644 index 4522f56063..0000000000 --- a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/prismic.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - Group - - - - - - - - - \ No newline at end of file diff --git a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/sb-logo.png b/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/sb-logo.png deleted file mode 100644 index 9201193134..0000000000 Binary files a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/sb-logo.png and /dev/null differ diff --git a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/storybook.svg b/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/storybook.svg deleted file mode 100644 index a5121d4fbf..0000000000 --- a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/storybook.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/storybookGrey.svg b/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/storybookGrey.svg deleted file mode 100644 index 857f5b9422..0000000000 --- a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/icons/storybookGrey.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/index.tsx b/packages/slice-machine/lib/builders/SliceBuilder/SideBar/index.tsx deleted file mode 100644 index 9a8c46d56c..0000000000 --- a/packages/slice-machine/lib/builders/SliceBuilder/SideBar/index.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import React from "react"; - -import { Box, Flex } from "theme-ui"; - -import Card from "@components/Card"; -import { ReactTooltipPortal } from "@components/ReactTooltipPortal"; - -import { ScreenshotPreview } from "@components/ScreenshotPreview"; - -import { ComponentUI } from "@lib/models/common/ComponentUI"; -import ScreenshotChangesModal from "@components/ScreenshotChangesModal"; -import { useScreenshotChangesModal } from "@src/hooks/useScreenshotChangesModal"; -import { Button } from "@components/Button"; -import { AiOutlineCamera } from "react-icons/ai"; -import { VariationSM } from "@lib/models/common/Slice"; -import ReactTooltip from "react-tooltip"; - -type SideBarProps = { - component: ComponentUI; - variation: VariationSM; - isTouched: boolean; -}; - -const NeedToSaveTooltip: React.FC = () => ( - - - Save your work in order to update the screenshot - - -); - -const SideBar: React.FunctionComponent = ({ - component, - variation, - isTouched, -}) => { - const { screenshots } = component; - const { openScreenshotsModal } = useScreenshotChangesModal(); - - return ( - - ( - <> - - + + + { + setShowVariationModal(false); + }} + onSubmit={(id, name, copiedVariation) => { + copyVariationSlice(id, name, copiedVariation); + const url = SLICES_CONFIG.getBuilderPagePathname({ + libraryName: slice.href, + sliceName: slice.model.name, + variationId: variation.id, + }); + void router.replace(url); + }} + variations={slice.model.variations} + /> + + ); +}; diff --git a/packages/slice-machine/lib/builders/SliceBuilder/Header/SimulatorButton/index.tsx b/packages/slice-machine/lib/builders/SliceBuilder/SimulatorButton/index.tsx similarity index 100% rename from packages/slice-machine/lib/builders/SliceBuilder/Header/SimulatorButton/index.tsx rename to packages/slice-machine/lib/builders/SliceBuilder/SimulatorButton/index.tsx diff --git a/packages/slice-machine/lib/builders/SliceBuilder/index.tsx b/packages/slice-machine/lib/builders/SliceBuilder/index.tsx index 4fa5466809..075061dfaf 100644 --- a/packages/slice-machine/lib/builders/SliceBuilder/index.tsx +++ b/packages/slice-machine/lib/builders/SliceBuilder/index.tsx @@ -1,18 +1,16 @@ -import { Button } from "@prismicio/editor-ui"; +import { Box, Button } from "@prismicio/editor-ui"; import React, { useState, useEffect } from "react"; import { handleRemoteResponse } from "@src/modules/toaster/utils"; -import { BaseStyles, Box, Grid } from "theme-ui"; - import FieldZones from "./FieldZones"; -import SideBar from "./SideBar"; -import Header from "./Header"; +import { Sidebar } from "./Sidebar"; import useSliceMachineActions from "src/modules/useSliceMachineActions"; import { useSelector } from "react-redux"; import { SliceMachineStoreType } from "@src/redux/type"; +import SimulatorButton from "@builders/SliceBuilder/SimulatorButton"; import { AppLayout, AppLayoutActions, @@ -21,44 +19,28 @@ import { AppLayoutContent, AppLayoutHeader, } from "@components/AppLayout"; -import SimulatorButton from "@lib/builders/SliceBuilder/Header/SimulatorButton"; -import { SliceSM, VariationSM } from "@lib/models/common/Slice"; +import { VariationSM } from "@lib/models/common/Slice"; import { ComponentUI } from "@lib/models/common/ComponentUI"; import { FloatingBackButton } from "@src/features/slices/sliceBuilder/FloatingBackButton"; import { selectIsSimulatorAvailableForFramework } from "@src/modules/environment"; import { isSelectedSliceTouched } from "@src/modules/selectedSlice/selectors"; -import { getRemoteSlice } from "@src/modules/slices"; -import { useModelStatus } from "@src/hooks/useModelStatus"; import { ComponentWithSliceProps } from "@src/layouts/WithSlice"; -import { - LocalAndRemoteSlice, - LocalOnlySlice, -} from "@lib/models/common/ModelData"; export type SliceBuilderState = { - imageLoading: boolean; loading: boolean; done: boolean; - error: null | string; - status: number | null; }; export const initialState: SliceBuilderState = { - imageLoading: false, loading: false, done: false, - error: null, - status: null, }; const SliceBuilder: ComponentWithSliceProps = ({ slice, variation }) => { const { openToaster, updateSlice } = useSliceMachineActions(); - const { isTouched, remoteSlice } = useSelector( - (store: SliceMachineStoreType) => ({ - isTouched: isSelectedSliceTouched(store, slice.from, slice.model.id), - remoteSlice: getRemoteSlice(store, slice.model.id), - }), + const isTouched = useSelector((store: SliceMachineStoreType) => + isSelectedSliceTouched(store, slice.from, slice.model.id), ); // We need to move this state to somewhere global to update the UI if any action from anywhere save or update to the filesystem I'd guess @@ -88,7 +70,6 @@ const SliceBuilder: ComponentWithSliceProps = ({ slice, variation }) => { updateSlice={updateSlice.bind(null, slice, setData)} slice={slice} variation={variation} - remoteSlice={remoteSlice} isTouched={isTouched} data={data} /> @@ -99,7 +80,6 @@ type SliceBuilderForVariationProps = { updateSlice: () => void; slice: ComponentUI; variation: VariationSM; - remoteSlice: SliceSM | undefined; isTouched: boolean; data: SliceBuilderState; }; @@ -107,24 +87,13 @@ const SliceBuilderForVariation: React.FC = ({ updateSlice, slice, variation, - remoteSlice, isTouched, data, }) => { - const { isSimulatorAvailableForFramework } = useSelector( - (state: SliceMachineStoreType) => ({ - isSimulatorAvailableForFramework: - selectIsSimulatorAvailableForFramework(state), - }), + const isSimulatorAvailableForFramework = useSelector( + selectIsSimulatorAvailableForFramework, ); - const sliceModel: LocalAndRemoteSlice | LocalOnlySlice = { - local: slice.model, - localScreenshots: slice.screenshots, - ...(remoteSlice ? { remote: remoteSlice } : {}), - }; - const { modelsStatuses } = useModelStatus({ slices: [sliceModel] }); - return ( @@ -146,24 +115,15 @@ const SliceBuilderForVariation: React.FC = ({ - -
- - - - - - - + + + + diff --git a/packages/slice-machine/lib/builders/common/Zone/Card/index.jsx b/packages/slice-machine/lib/builders/common/Zone/Card/index.jsx index 4a47905377..5a7dc1ed59 100644 --- a/packages/slice-machine/lib/builders/common/Zone/Card/index.jsx +++ b/packages/slice-machine/lib/builders/common/Zone/Card/index.jsx @@ -23,7 +23,6 @@ const FieldZone = ({ isRepeatable, dataCy, isRepeatableCustomType, - sx, }) => { return ( { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call diff --git a/packages/slice-machine/lib/builders/common/Zone/components/ZoneHeader/index.tsx b/packages/slice-machine/lib/builders/common/Zone/components/ZoneHeader/index.tsx deleted file mode 100644 index 408d642c63..0000000000 --- a/packages/slice-machine/lib/builders/common/Zone/components/ZoneHeader/index.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Flex } from "theme-ui"; - -interface ZoneHeaderProps { - Heading: JSX.Element; - Actions: JSX.Element; -} - -const ZoneHeader: React.FunctionComponent = ({ - Heading, - Actions, -}) => ( - - {Heading} - {Actions} - -); - -export default ZoneHeader; diff --git a/packages/slice-machine/lib/builders/common/Zone/index.jsx b/packages/slice-machine/lib/builders/common/Zone/index.jsx index 441c8706f7..e164ae4993 100644 --- a/packages/slice-machine/lib/builders/common/Zone/index.jsx +++ b/packages/slice-machine/lib/builders/common/Zone/index.jsx @@ -1,7 +1,7 @@ -import { Button, ButtonGroup, Switch, Text } from "@prismicio/editor-ui"; +import { Button, Switch, Text } from "@prismicio/editor-ui"; import { array, arrayOf, bool, func, object, shape, string } from "prop-types"; import { useState } from "react"; -import { BaseStyles, Heading } from "theme-ui"; +import { BaseStyles } from "theme-ui"; import { ListHeader } from "@src/components/List"; @@ -9,7 +9,6 @@ import SelectFieldTypeModal from "../SelectFieldTypeModal"; import NewField from "./Card/components/NewField"; import Card from "./Card"; import EmptyState from "./components/EmptyState"; -import ZoneHeader from "./components/ZoneHeader"; const Zone = ({ zoneType /* type of the zone: customType or slice */, @@ -30,8 +29,6 @@ const Zone = ({ dataCy, isRepeatableCustomType, }) => { - const isCustomType = zoneType === "customType"; - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const widgetsArrayWithCondUid = (() => { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument @@ -74,68 +71,38 @@ const Zone = ({ return ( <> - {isCustomType ? ( - 0 ? ( - <> - - Show code snippets? - - - - - ) : undefined - } - > - {title} - - ) : ( - - {title}} - Actions={ - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - fields.length > 0 ? ( - - - - - ) : null - } - /> - - )} + 0 ? ( + <> + + Show code snippets? + + + + + ) : undefined + } + > + {title} + { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/strict-boolean-expressions fields.length === 0 && !newFieldData ? ( @@ -191,7 +158,6 @@ const Zone = ({ /> ) } - sx={isCustomType ? { paddingInline: "16px !important" } : {}} /> ) : undefined diff --git a/packages/slice-machine/src/components/List/List.css.ts b/packages/slice-machine/src/components/List/List.css.ts index 26f31ca4d2..226e09c6a1 100644 --- a/packages/slice-machine/src/components/List/List.css.ts +++ b/packages/slice-machine/src/components/List/List.css.ts @@ -64,6 +64,7 @@ export const headerActions = style([ flexGrow: 1, gap: 8, justifyContent: "end", + minWidth: 0, }), ]); diff --git a/packages/slice-machine/src/components/List/List.stories.tsx b/packages/slice-machine/src/components/List/List.stories.tsx index 79cc81e196..fb9f1147bb 100644 --- a/packages/slice-machine/src/components/List/List.stories.tsx +++ b/packages/slice-machine/src/components/List/List.stories.tsx @@ -19,7 +19,7 @@ export const Default = { - + Show code snippets? diff --git a/packages/slice-machine/src/components/List/List.tsx b/packages/slice-machine/src/components/List/List.tsx index 10ff5a16bd..681ce7efd1 100644 --- a/packages/slice-machine/src/components/List/List.tsx +++ b/packages/slice-machine/src/components/List/List.tsx @@ -23,7 +23,7 @@ export const ListHeader: FC = ({ ...otherProps }) => (
- + {children} {toggle} diff --git a/packages/slice-machine/src/features/slices/sliceCards/SharedSliceCard.tsx b/packages/slice-machine/src/features/slices/sliceCards/SharedSliceCard.tsx index 783cae52a3..2077f0ca96 100644 --- a/packages/slice-machine/src/features/slices/sliceCards/SharedSliceCard.tsx +++ b/packages/slice-machine/src/features/slices/sliceCards/SharedSliceCard.tsx @@ -107,6 +107,7 @@ export const SharedSliceCard: FC = (props) => { return ( void; - openScreenshotsModal: () => void; }; export const useScreenshotChangesModal = (): Payload => { @@ -29,6 +28,5 @@ export const useScreenshotChangesModal = (): Payload => { return { modalPayload, onOpenModal, - openScreenshotsModal, }; };