This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch space-under-dataset-change-warning
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to
refs/heads/space-under-dataset-change-warning by this push:
new f15a0e0 fix: moving the typing to a better spot, adding the new prop
to storybook.
f15a0e0 is described below
commit f15a0e06586bf1afffb6344d1e6f6dcc77d79824
Author: Evan Rusackas <[email protected]>
AuthorDate: Tue May 11 18:38:02 2021 -0700
fix: moving the typing to a better spot, adding the new prop to storybook.
---
superset-frontend/src/components/Alert/Alert.stories.tsx | 8 +++++++-
superset-frontend/src/components/Alert/index.tsx | 6 ++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/superset-frontend/src/components/Alert/Alert.stories.tsx
b/superset-frontend/src/components/Alert/Alert.stories.tsx
index da02aae..88f7b86 100644
--- a/superset-frontend/src/components/Alert/Alert.stories.tsx
+++ b/superset-frontend/src/components/Alert/Alert.stories.tsx
@@ -74,10 +74,16 @@ AlertGallery.story = {
},
};
-export const InteractiveAlert = (args: AlertProps) => <Alert {...args} />;
+export const InteractiveAlert = (args: AlertProps) => (
+ <>
+ <Alert {...args} />
+ Some content to test the `roomBelow` prop
+ </>
+);
InteractiveAlert.args = {
closable: true,
+ roomBelow: false,
type: 'info',
message: smallText,
description: bigText,
diff --git a/superset-frontend/src/components/Alert/index.tsx
b/superset-frontend/src/components/Alert/index.tsx
index d9144e7..89a782f 100644
--- a/superset-frontend/src/components/Alert/index.tsx
+++ b/superset-frontend/src/components/Alert/index.tsx
@@ -25,9 +25,11 @@ import { useTheme } from '@superset-ui/core';
import Icon from 'src/components/Icon';
import Icons from 'src/components/Icons';
-export type AlertProps = PropsWithChildren<AntdAlertProps>;
+export type AlertProps = PropsWithChildren<
+ AntdAlertProps & { roomBelow?: boolean }
+>;
-export default function Alert(props: AlertProps & { roomBelow?: boolean }) {
+export default function Alert(props: AlertProps) {
const {
type = 'info',
description,