Browse Source

update toast

- allow any message
- add title case for title
- customize styling
master
jeffvli 3 years ago
parent
commit
4f8be81669
  1. 4
      src/components/shared/toast.ts
  2. 6
      src/styles/custom-theme.less

4
src/components/shared/toast.ts

@ -2,10 +2,10 @@ import { Notification } from 'rsuite';
export const notifyToast = (
type: 'info' | 'success' | 'warning' | 'error',
message: string
message: any
) => {
Notification[type]({
title: type.toUpperCase(),
title: `${type.charAt(0).toUpperCase()}${type.slice(1)}`,
description: message,
});
};

6
src/styles/custom-theme.less

@ -28,6 +28,12 @@
@modal-content-padding: 10px;
@modal-title-line-height: 1px;
// Notification
@notify-padding: 10px;
@notify-title-icon-size: 15px;
@notify-close-btn-font-size: 0px;
@notify-close-btn-margin: 0px;
// Table
@table-body-background: undefined;
@table-border-color: undefined;

Loading…
Cancel
Save