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 classnames from 'classnames';
export type TagVariant =
| 'average'
| 'good'
| 'excellent'
| 'critical'
| 'list'
| 'unknown'
| 'wordpress';
type Props = {
children?: ReactNode;
variant?:
| 'average'
| 'good'
| 'excellent'
| 'critical'
| 'list'
| 'unknown'
| 'wordpress';
variant?: TagVariant;
dimension?: 'large';
isInverted?: boolean;
className?: string;

View File

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