Skip to content

Commit

Permalink
feat(#67): add summary component to storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
mari1912 committed Jul 11, 2024
1 parent 0daa93b commit 4660c1c
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions dashboard/src/components/Summary/Summary.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import type { Meta, StoryObj } from '@storybook/react';

import Summary, { ISummaryItem } from './Summary';

const meta = {
title: 'Summary',
component: Summary,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
} satisfies Meta<typeof Summary>;

export default meta;
type Story = StoryObj<typeof meta>;

const items: ISummaryItem[] = [
{
arch: {
errors: 4,
warnings: 1,
text: 'arm64',
},
compilers: [
'aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110',
'Debian clang version 17.0.6 (++20231208085823+6009708b436...)',
],
},
{
arch: {
errors: 4,
warnings: 1,
text: 'arm64',
},
compilers: [
'aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110',
'Debian clang version 17.0.6 (++20231208085823+6009708b436...)',
],
},
{
arch: {
errors: 4,
warnings: 1,
text: 'arm64',
},
compilers: [
'aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110',
'Debian clang version 17.0.6 (++20231208085823+6009708b436...)',
],
},
{
arch: {
errors: 4,
warnings: 1,
text: 'arm64',
},
compilers: [
'aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110',
'Debian clang version 17.0.6 (++20231208085823+6009708b436++20231208085823+6009708b436++20231208085823+6009708b436++20231208085823+6009708b436)',
],
},
];

export const Default: Story = {
args: {
summaryBody: items,
title: 'Summary',
summaryHeaders: ['Arch', 'Compiler'],
},
};

0 comments on commit 4660c1c

Please sign in to comment.