Skip to content

Commit

Permalink
Restrict Fixed #3021 - Toast/Message SeverityType to the only four va…
Browse files Browse the repository at this point in the history
…lid values (#2911)

* Restrict ToastSeverityType to the only four valid values

* Restrict MessageSeverityType to the only four valid values

* Restrict MessagesSeverityType to the only four valid values

* Restrict BadgeSeverityType to the only four valid values

* Restrict TagSeverityType to the only four valid values
  • Loading branch information
inad9300 authored Jul 1, 2022
1 parent da52f59 commit a84ca64
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/lib/badge/Badge.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

type BadgeSeverityType = 'success' | 'info' | 'warn' | 'error' | (string & {});
type BadgeSeverityType = 'success' | 'info' | 'warn' | 'error';

type BadgeSizeType = 'normal' | 'large' | 'xlarge';

Expand Down
2 changes: 1 addition & 1 deletion components/lib/message/Message.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

type MessageSeverityType = 'success' | 'info' | 'warn' | 'error' | (string & {});
type MessageSeverityType = 'success' | 'info' | 'warn' | 'error';

type MessageContentType = React.ReactNode | ((props: MessageProps) => React.ReactNode);

Expand Down
2 changes: 1 addition & 1 deletion components/lib/messages/Messages.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { CSSTransitionProps } from '../csstransition';

type MessagesSeverityType = 'success' | 'info' | 'warn' | 'error' | (string & {});
type MessagesSeverityType = 'success' | 'info' | 'warn' | 'error';

type MessagesMessageType = MessagesMessage | MessagesMessage[];

Expand Down
2 changes: 1 addition & 1 deletion components/lib/tag/Tag.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { IconType } from '../utils';

type TagSeverityType = 'success' | 'info' | 'warn' | 'error' | (string & {});
type TagSeverityType = 'success' | 'info' | 'warn' | 'error';

export interface TagProps {
value?: React.ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion components/lib/toast/Toast.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { CSSTransitionProps } from '../csstransition';

type ToastSeverityType = 'success' | 'info' | 'warn' | 'error' | (string & {});
type ToastSeverityType = 'success' | 'info' | 'warn' | 'error';

type ToastMessageType = ToastMessage | ToastMessage[];

Expand Down

0 comments on commit a84ca64

Please sign in to comment.