You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/components/StatusBadge.stories.tsx

68 lines
1.1 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

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
</>
),
},
};