Skip to content

Commit

Permalink
docs(ffe-chart-donut-react): storybook example
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hellstrand committed Sep 11, 2024
1 parent 9e7c6de commit 820b0b1
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions packages/ffe-chart-donut-react/src/ChartDonut.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from 'react';
import { ChartDonut } from './ChartDonut';
import type { StoryObj, Meta } from '@storybook/react';

const meta: Meta<typeof ChartDonut> = {
title: 'components/chart-donut/ChartDonut',
component: ChartDonut,
tags: ['autodocs'],
};
export default meta;

type Story = StoryObj<typeof ChartDonut>;

export const Standard: Story = {
args: {
name: 'Name',
firstLabel: 'First label',
lastLabel: 'Last label',
percentage: 42,
},
render: args => <ChartDonut {...args} />,
};
export const Custom: Story = {
args: {
name: 'Name',
percentage: 42,
label: (
<div
style={{
marginTop: 10,
textAlign: 'center',
}}
>
Du har selv ansvar
<br />
<strong>for all styling</strong>
</div>
),
},
render: args => <ChartDonut {...args} />,
};

0 comments on commit 820b0b1

Please sign in to comment.