mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 12:35:30 +02:00
storybook autodocs
This commit is contained in:
parent
c9c3f29fbd
commit
861936c671
54 changed files with 250 additions and 58 deletions
|
|
@ -16,6 +16,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof BuildCommit>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof BuildVersion>
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import {Canvas, Meta} from '@storybook/addon-docs/blocks';
|
||||
|
||||
import * as Stories from './FormattedMessage.stories';
|
||||
|
||||
<Meta of={Stories} />
|
||||
|
||||
# FormattedMessage
|
||||
|
||||
Component to display formatted `formatjs` messages using dynamic slots.
|
||||
|
||||
<Canvas of={Stories.Default} />
|
||||
|
|
@ -6,6 +6,11 @@ const meta = {
|
|||
component: FormattedMessage,
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: 'Component to display formatted `formatjs` messages using dynamic slots.',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof FormattedMessage>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof LocaleSelector>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
modelValue: 20,
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
|
||||
|
||||
import * as Stories from './PresentationSelector.stories';
|
||||
|
||||
<Meta of={Stories} />
|
||||
|
||||
# PresentationSelector
|
||||
|
||||
A button that will display a list of presentation modes when clicked.
|
||||
|
||||
<Canvas of={Stories.Default} />
|
||||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: 'A button that will display a list of presentation modes when clicked.',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
modelValue: 'grid',
|
||||
|
|
@ -30,6 +35,7 @@ export const Default: Story = {
|
|||
}
|
||||
|
||||
export const Clicked: Story = {
|
||||
tags: ['!autodocs'],
|
||||
args: {},
|
||||
play: async ({ canvas, userEvent }) => {
|
||||
await expect(canvas.getByRole('button')).toBeEnabled()
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof RemoteFileList>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof SnackQueue>
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
|
||||
|
||||
import * as Stories from './ThemeSelector.stories';
|
||||
|
||||
<Meta of={Stories} />
|
||||
|
||||
# ThemeSelector
|
||||
|
||||
A cycling button to change the theme.
|
||||
|
||||
<Canvas of={Stories.Default} />
|
||||
|
|
@ -13,6 +13,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: 'A cycling button to change the theme.',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof ThemeSelector>
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
|
||||
|
||||
import * as Stories from './Card.stories';
|
||||
|
||||
<Meta of={Stories} />
|
||||
|
||||
# AnnouncementCard
|
||||
|
||||
A card showing the details of a Komga announcement.
|
||||
|
||||
<Canvas of={Stories.Unread} />
|
||||
|
|
@ -12,12 +12,18 @@ const meta = {
|
|||
},
|
||||
template: '<Card :item="args.item"/>',
|
||||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
},
|
||||
|
||||
args: {
|
||||
onMarkRead: fn(),
|
||||
},
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: 'A card showing the details of a Komga announcement.',
|
||||
},
|
||||
},
|
||||
},
|
||||
} satisfies Meta<typeof Card>
|
||||
|
||||
export default meta
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof DeletionWarning>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof ForceSyncWarning>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
dialog: true,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
onAddApiKey: fn(),
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
dialog: true,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
dialog: true,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
dialog: true,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
dialog: true,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof HistoryTable>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof BookConverted>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof BookFileDeleted>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof BookImported>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof DuplicatePageDeleted>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof SeriesDirectoryDeleted>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
onScan: fn(),
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof TransientBooksTable>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof Table>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof Drawer>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof ReorderLibraries>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof Libraries>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof BottomNavigation>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof DeletionWarning>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof TabNavigation>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof CreateEdit>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof StepGeneral>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof StepMetadata>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof StepOptions>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof StepScanner>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof KnownTable>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
modelValue: 'hash1',
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof UnknownTable>
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
import { Canvas, Meta } from '@storybook/addon-docs/blocks';
|
||||
|
||||
import * as Stories from './Card.stories';
|
||||
|
||||
<Meta of={Stories} />
|
||||
|
||||
# ReleaseCard
|
||||
|
||||
A card showing the details of a Komga release.
|
||||
|
||||
<Canvas of={Stories.LatestAndCurrent} />
|
||||
|
|
@ -13,6 +13,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: 'A card showing the details of a Komga release.',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof Card>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
settings: {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof AuthenticationActivityTable>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof DeletionWarning>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
user: {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {
|
||||
onAddUser: fn(),
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof ChangePassword>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ const meta = {
|
|||
}),
|
||||
parameters: {
|
||||
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
||||
docs: {
|
||||
description: {
|
||||
component: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: {},
|
||||
} satisfies Meta<typeof CreateEdit>
|
||||
|
|
|
|||
Loading…
Reference in a new issue