Newer
Older
import { type Meta, type StoryObj } from '@storybook/angular';
import { AttachmentComponent } from './attachment.component';
const meta: Meta<AttachmentComponent> = {
title: 'Attachment',
component: AttachmentComponent,
excludeStories: /.*Data$/,
tags: ['autodocs'],
};
export default meta;
export const Default: Story = {
name: 'File with pdf icon',
args: {
caption: 'Katzenanmeldung_1231231_eingang.pdf',
errorCaption: 'Error!',
loadingCaption: 'Loading...',
description: 'Error text appears when eror messages array is not empty',
description: 'Loading text appears when isLoading flag is true',
description: 'Description can contain size of file or e.g. loading progress',
table: {
defaultValue: { summary: 'false' },
},
},
errorMessages: {
description: 'The array containing strings with errors text',
},
};
export const Doc: Story = {
name: 'File with doc icon',
args: {
caption: 'Katzenanmeldung_1231231_eingang.doc',
name: 'File with loading icon',
loadingCaption: 'Katzenanmeldung_1231231_eingang.doc',
export const Error: Story = {
name: 'Error message in file',
args: {
errorMessages: ['Erlaubte Dateiendungen: pdf, jpg, png, jpeg'],