Skip to content

Commit 84cc5b0

Browse files
committed
chore: update antd and add proper types
1 parent e1678fd commit 84cc5b0

File tree

5 files changed

+38
-30
lines changed

5 files changed

+38
-30
lines changed

superset-frontend/package-lock.json

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

superset-frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"@visx/xychart": "^3.5.1",
130130
"ag-grid-community": "34.2.0",
131131
"ag-grid-react": "34.2.0",
132-
"antd": "^5.24.6",
132+
"antd": "^5.26.5",
133133
"chrono-node": "^2.7.8",
134134
"classnames": "^2.2.5",
135135
"content-disposition": "^0.5.4",

superset-frontend/src/components/MessageToasts/actions.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
* under the License.
1818
*/
1919
import { nanoid } from 'nanoid';
20-
import { ToastType, ToastMeta } from './types';
21-
22-
type ToastOptions = Partial<Omit<ToastMeta, 'id' | 'toastType' | 'text'>>;
20+
import { ToastType, ToastMeta, ToastOptions } from './types';
2321

2422
export function getToastUuid(type: ToastType) {
2523
return `${type}-${nanoid()}`;

superset-frontend/src/components/MessageToasts/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,13 @@ export interface ToastMeta {
3333
noDuplicate?: boolean;
3434
/** For security reasons, HTML rendering is disabled by default. Use this property to enable it. */
3535
allowHtml?: boolean;
36+
description?: string;
3637
}
38+
export type ToastOptions = Partial<
39+
Omit<ToastMeta, 'id' | 'toastType' | 'text'>
40+
>;
41+
42+
export type ToastTriggerFunction = (
43+
message: string,
44+
options?: ToastOptions,
45+
) => void;

superset-frontend/src/pages/ThemeList/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import {
5959
unsetSystemDefaultTheme,
6060
unsetSystemDarkTheme,
6161
} from 'src/features/themes/api';
62+
import { ToastTriggerFunction } from 'src/components/MessageToasts/types';
6263

6364
const PAGE_SIZE = 25;
6465

@@ -79,8 +80,8 @@ const CONFIRM_OVERWRITE_MESSAGE = t(
7980
);
8081

8182
interface ThemesListProps {
82-
addDangerToast: (msg: string) => void;
83-
addSuccessToast: (msg: string) => void;
83+
addDangerToast: ToastTriggerFunction;
84+
addSuccessToast: ToastTriggerFunction;
8485
user: {
8586
userId: string | number;
8687
firstName: string;

0 commit comments

Comments
 (0)