Skip to content

Commit

Permalink
Format all stories using prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot committed Nov 12, 2024
1 parent fc935c2 commit f03a9ad
Show file tree
Hide file tree
Showing 130 changed files with 9,240 additions and 9,162 deletions.
94 changes: 47 additions & 47 deletions stories/victory-charts/victory-area/events.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
import React from "react";
import type { Meta } from "@storybook/react";

import { VictoryArea, VictoryChart, VictoryTheme } from "@/victory";
import { Story, ComponentMeta } from "./config";
import { getData } from "../../utils/data";

const meta: Meta<typeof VictoryArea> = {
...ComponentMeta,
title: "Victory Charts/VictoryArea",
};

export const Events: Story = {
args: {},
render: (props) => (
<VictoryChart theme={VictoryTheme[props.themeKey]}>
<VictoryArea
{...props}
style={{ data: { fill: "tomato" } }}
events={[
{
target: "data",
eventHandlers: {
onClick: () => {
return [
{
eventKey: "all",
target: "data",
mutation: (eventProps) => {
const fill = eventProps.style && eventProps.style.fill;
return fill === "black"
? null
: { style: { fill: "black" } };
},
},
];
},
},
},
]}
data={getData(5)}
/>
</VictoryChart>
),
};

export default meta;
import React from "react";
import type { Meta } from "@storybook/react";

import { VictoryArea, VictoryChart, VictoryTheme } from "@/victory";
import { Story, ComponentMeta } from "./config";
import { getData } from "../../utils/data";

const meta: Meta<typeof VictoryArea> = {
...ComponentMeta,
title: "Victory Charts/VictoryArea",
};

export const Events: Story = {
args: {},
render: (props) => (
<VictoryChart theme={VictoryTheme[props.themeKey]}>
<VictoryArea
{...props}
style={{ data: { fill: "tomato" } }}
events={[
{
target: "data",
eventHandlers: {
onClick: () => {
return [
{
eventKey: "all",
target: "data",
mutation: (eventProps) => {
const fill = eventProps.style && eventProps.style.fill;
return fill === "black"
? null
: { style: { fill: "black" } };
},
},
];
},
},
},
]}
data={getData(5)}
/>
</VictoryChart>
),
};

export default meta;
94 changes: 47 additions & 47 deletions stories/victory-charts/victory-area/labels.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
import React from "react";
import type { Meta } from "@storybook/react";

import { VictoryArea, VictoryChart } from "@/victory";
import { Story, ComponentMeta } from "./config";
import { getData } from "../../utils/data";

const meta: Meta<typeof VictoryArea> = {
...ComponentMeta,
title: "Victory Charts/VictoryArea",
};

export const Labels: Story = {
args: {},
render: (props) => (
<>
<VictoryChart>
<VictoryArea
{...props}
data={getData(7)}
labels={({ datum }) => `x: ${datum.x}`}
/>
</VictoryChart>
<VictoryChart>
<VictoryArea
{...props}
data={getData(7)}
labels={["", "", "three", "four", "5", "six"]}
/>
</VictoryChart>
<VictoryChart>
<VictoryArea
{...props}
data={[
{ x: 1, y: 2, label: "cat" },
{ x: 2, y: 5, label: "dog" },
{ x: 3, y: 3, label: "dog" },
{ x: 4, y: -2, label: "bird" },
{ x: 5, y: -5, label: "cat" },
]}
/>
</VictoryChart>
</>
),
};

export default meta;
import React from "react";
import type { Meta } from "@storybook/react";

import { VictoryArea, VictoryChart } from "@/victory";
import { Story, ComponentMeta } from "./config";
import { getData } from "../../utils/data";

const meta: Meta<typeof VictoryArea> = {
...ComponentMeta,
title: "Victory Charts/VictoryArea",
};

export const Labels: Story = {
args: {},
render: (props) => (
<>
<VictoryChart>
<VictoryArea
{...props}
data={getData(7)}
labels={({ datum }) => `x: ${datum.x}`}
/>
</VictoryChart>
<VictoryChart>
<VictoryArea
{...props}
data={getData(7)}
labels={["", "", "three", "four", "5", "six"]}
/>
</VictoryChart>
<VictoryChart>
<VictoryArea
{...props}
data={[
{ x: 1, y: 2, label: "cat" },
{ x: 2, y: 5, label: "dog" },
{ x: 3, y: 3, label: "dog" },
{ x: 4, y: -2, label: "bird" },
{ x: 5, y: -5, label: "cat" },
]}
/>
</VictoryChart>
</>
),
};

export default meta;
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export const PolarInterpolation: Story = {
style={{ textAnchor: "middle" }}
text={interpolation}
/>
<VictoryArea {...props} interpolation={interpolation as InterpolationPropType} />
<VictoryArea
{...props}
interpolation={interpolation as InterpolationPropType}
/>
</VictoryChart>
))}
</>
Expand Down
140 changes: 70 additions & 70 deletions stories/victory-charts/victory-area/polar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
import React from "react";
import type { Meta } from "@storybook/react";

import {
VictoryArea,
VictoryChart,
VictoryStack,
VictoryTheme,
} from "@/victory";
import { Story, ComponentMeta } from "./config";
import { getData } from "../../utils/data";

const meta: Meta<typeof VictoryArea> = {
...ComponentMeta,
title: "Victory Charts/VictoryArea",
};

export const Polar: Story = {
args: {},
render: (props) => (
<>
<VictoryChart polar theme={VictoryTheme[props.themeKey]}>
<VictoryArea {...props} data={getData(7)} />
</VictoryChart>
<VictoryChart polar innerRadius={50} theme={VictoryTheme[props.themeKey]}>
<VictoryArea {...props} data={getData(7)} />
</VictoryChart>
<VictoryChart polar theme={VictoryTheme[props.themeKey]}>
<VictoryArea
{...props}
data={[
{ x: "Cat", y: 62 },
{ x: "Dog", y: 91 },
{ x: "Fish", y: 55 },
{ x: "Bird", y: 55 },
{ x: "Frog", y: 75 },
]}
/>
</VictoryChart>
<VictoryChart polar innerRadius={50} theme={VictoryTheme[props.themeKey]}>
<VictoryArea
{...props}
data={[
{ x: "Cat", y: 62 },
{ x: "Dog", y: 91 },
{ x: "Fish", y: 55 },
{ x: "Bird", y: 55 },
{ x: "Frog", y: 75 },
]}
/>
</VictoryChart>
<VictoryChart polar theme={VictoryTheme[props.themeKey]}>
<VictoryStack>
<VictoryArea {...props} data={getData(5)} />
<VictoryArea {...props} data={getData(5, "seed-1")} />
<VictoryArea {...props} data={getData(5, "seed-2")} />
</VictoryStack>
</VictoryChart>
<VictoryChart polar innerRadius={50} theme={VictoryTheme[props.themeKey]}>
<VictoryStack>
<VictoryArea {...props} data={getData(5)} />
<VictoryArea {...props} data={getData(5, "seed-1")} />
<VictoryArea {...props} data={getData(5, "seed-2")} />
</VictoryStack>
</VictoryChart>
</>
),
};

export default meta;
import React from "react";
import type { Meta } from "@storybook/react";

import {
VictoryArea,
VictoryChart,
VictoryStack,
VictoryTheme,
} from "@/victory";
import { Story, ComponentMeta } from "./config";
import { getData } from "../../utils/data";

const meta: Meta<typeof VictoryArea> = {
...ComponentMeta,
title: "Victory Charts/VictoryArea",
};

export const Polar: Story = {
args: {},
render: (props) => (
<>
<VictoryChart polar theme={VictoryTheme[props.themeKey]}>
<VictoryArea {...props} data={getData(7)} />
</VictoryChart>
<VictoryChart polar innerRadius={50} theme={VictoryTheme[props.themeKey]}>
<VictoryArea {...props} data={getData(7)} />
</VictoryChart>
<VictoryChart polar theme={VictoryTheme[props.themeKey]}>
<VictoryArea
{...props}
data={[
{ x: "Cat", y: 62 },
{ x: "Dog", y: 91 },
{ x: "Fish", y: 55 },
{ x: "Bird", y: 55 },
{ x: "Frog", y: 75 },
]}
/>
</VictoryChart>
<VictoryChart polar innerRadius={50} theme={VictoryTheme[props.themeKey]}>
<VictoryArea
{...props}
data={[
{ x: "Cat", y: 62 },
{ x: "Dog", y: 91 },
{ x: "Fish", y: 55 },
{ x: "Bird", y: 55 },
{ x: "Frog", y: 75 },
]}
/>
</VictoryChart>
<VictoryChart polar theme={VictoryTheme[props.themeKey]}>
<VictoryStack>
<VictoryArea {...props} data={getData(5)} />
<VictoryArea {...props} data={getData(5, "seed-1")} />
<VictoryArea {...props} data={getData(5, "seed-2")} />
</VictoryStack>
</VictoryChart>
<VictoryChart polar innerRadius={50} theme={VictoryTheme[props.themeKey]}>
<VictoryStack>
<VictoryArea {...props} data={getData(5)} />
<VictoryArea {...props} data={getData(5, "seed-1")} />
<VictoryArea {...props} data={getData(5, "seed-2")} />
</VictoryStack>
</VictoryChart>
</>
),
};

export default meta;
Loading

0 comments on commit f03a9ad

Please sign in to comment.