Skip to content

Commit

Permalink
docs: refactor stories (#98)
Browse files Browse the repository at this point in the history
* docs: refactor stories

* test: update visual test snapshots
  • Loading branch information
hkfb authored Nov 2, 2024
1 parent d4bfc7e commit 39ddde4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/components/focus-gpx-map.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
import * as React from "react";
import { FocusGpxMap } from "./focus-gpx-map";
import type { Meta, StoryObj } from "@storybook/react";

export default {
title: "Focus GPX Map",
type Story = StoryObj<typeof FocusGpxMap>;

const meta: Meta<typeof FocusGpxMap> = {
tags: ["autodocs"],
component: FocusGpxMap,
parameters: {
docs: {
story: {
height: "400px",
},
},
},
};

export function FocusGpxMapDefault() {
return <FocusGpxMap></FocusGpxMap>;
}
export default meta;

export const Default: Story = {};

export function FocusGpxMapSelect({ gpxUrl }: { gpxUrl: string }) {
return <FocusGpxMap gpx={gpxUrl}></FocusGpxMap>;
Expand Down
8 changes: 8 additions & 0 deletions src/layers/gpx-layer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ import type { StoryObj } from "@storybook/react";

export default {
title: "Layers / GPX Layer",
tags: ["autodocs"],
parameters: {
docs: {
story: {
height: "600px",
},
},
},
};

const gpxFile = "Jotunheimen_rundt.gpx";
Expand Down

0 comments on commit 39ddde4

Please sign in to comment.