Add type TagVariant for variant strings

MAILPOET-4688
This commit is contained in:
Oluwaseun Olorunsola
2022-10-27 09:06:35 +01:00
committed by Aschepikov
parent df2982454e
commit fd6b49e598
2 changed files with 12 additions and 17 deletions

View File

@@ -1,16 +1,18 @@
import { ReactNode } from 'react'; import { ReactNode } from 'react';
import classnames from 'classnames'; import classnames from 'classnames';
export type TagVariant =
| 'average'
| 'good'
| 'excellent'
| 'critical'
| 'list'
| 'unknown'
| 'wordpress';
type Props = { type Props = {
children?: ReactNode; children?: ReactNode;
variant?: variant?: TagVariant;
| 'average'
| 'good'
| 'excellent'
| 'critical'
| 'list'
| 'unknown'
| 'wordpress';
dimension?: 'large'; dimension?: 'large';
isInverted?: boolean; isInverted?: boolean;
className?: string; className?: string;

View File

@@ -1,5 +1,5 @@
import { ReactNode } from 'react'; import { ReactNode } from 'react';
import { Tag } from './tag'; import { Tag, TagVariant } from './tag';
import { Tooltip } from '../tooltip/tooltip'; import { Tooltip } from '../tooltip/tooltip';
import { MailPoet } from '../../mailpoet'; import { MailPoet } from '../../mailpoet';
@@ -21,14 +21,7 @@ type Props = {
segments?: Segment[]; segments?: Segment[];
subscriberTags?: SubscriberTag[]; subscriberTags?: SubscriberTag[];
strings?: string[]; strings?: string[];
variant?: variant?: TagVariant;
| 'average'
| 'good'
| 'excellent'
| 'critical'
| 'list'
| 'unknown'
| 'wordpress';
isInverted?: boolean; isInverted?: boolean;
}; };