mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
feat(app): migrate app parent view to react [EE-5361] (#10086)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
531f88b947
commit
841ca1ebd4
42 changed files with 1448 additions and 810 deletions
|
@ -1,6 +1,6 @@
|
|||
import { Meta } from '@storybook/react';
|
||||
|
||||
import { Badge, Props } from './Badge';
|
||||
import { Badge, BadgeType, Props } from './Badge';
|
||||
|
||||
export default {
|
||||
component: Badge,
|
||||
|
@ -17,11 +17,15 @@ export default {
|
|||
|
||||
// : JSX.IntrinsicAttributes & PropsWithChildren<Props>
|
||||
function Template({ type = 'success' }: Props) {
|
||||
const message = {
|
||||
const message: Record<BadgeType, string> = {
|
||||
success: 'success badge',
|
||||
danger: 'danger badge',
|
||||
warn: 'warn badge',
|
||||
info: 'info badge',
|
||||
successSecondary: 'successSecondary badge',
|
||||
dangerSecondary: 'dangerSecondary badge',
|
||||
warnSecondary: 'warnSecondary badge',
|
||||
infoSecondary: 'infoSecondary badge',
|
||||
};
|
||||
return <Badge type={type}>{message[type]}</Badge>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue