-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Setup Storybook for
MapAndLabel
(#3585)
- Loading branch information
1 parent
75c620c
commit 3110a90
Showing
4 changed files
with
95 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
editor.planx.uk/src/@planx/components/MapAndLabel/Public/MapAndLabel.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
import React from "react"; | ||
|
||
import Wrapper from "../../fixtures/Wrapper"; | ||
import Editor from "../Editor"; | ||
import { Trees } from "../schemas/Trees"; | ||
import { Presentational as Public, PresentationalProps } from "."; | ||
|
||
const meta = { | ||
title: "PlanX Components/MapAndLabel", | ||
component: Public, | ||
} satisfies Meta<typeof Public>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
const props: PresentationalProps = { | ||
title: "Map and label the works to trees for this property", | ||
description: "Add one or many trees below", | ||
schemaName: "Trees", | ||
fn: "MockFn", | ||
schema: Trees, | ||
basemap: "OSM", | ||
drawColor: "#00FF00", | ||
drawType: "Point", | ||
longitude: -0.1629784, | ||
latitude: 51.5230919, | ||
}; | ||
|
||
export const Basic: Story = { | ||
args: props, | ||
}; | ||
|
||
export const WithEditor = () => { | ||
return <Wrapper Editor={Editor} Public={() => <Public {...props} />} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters