1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00
portainer/app/react/components/StatusBadge.stories.tsx

67 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Meta, StoryObj } from '@storybook/react';
import { Check } from 'lucide-react';
import { StatusBadge } from './StatusBadge';
const meta: Meta<typeof StatusBadge> = {
title: 'Components/StatusBadge',
component: StatusBadge,
};
export default meta;
type Story = StoryObj<typeof StatusBadge>;
export const Default: Story = {
args: {
children: 'Default',
},
};
export const WithIcon: Story = {
args: {
icon: Check,
children: 'With Icon',
},
};
export const Success: Story = {
args: {
color: 'success',
children: 'Success',
},
};
export const Warning: Story = {
args: {
color: 'warning',
children: 'Warning',
},
};
export const Danger: Story = {
args: {
color: 'danger',
children: 'Danger',
},
};
export const WithAriaAttributes: Story = {
args: {
'aria-label': 'Badge with Aria Attributes',
children: 'With Aria Attributes',
},
};
export const WithChildren: Story = {
args: {
children: (
<>
<span role="img" aria-label="Star">
</span>
With Children
</>
),
},
};