mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
theme toast icons and various cosmetic updates
This commit is contained in:
@@ -75,6 +75,7 @@ const ShareSqlLabQuery = ({
|
|||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
buttonSize="small"
|
buttonSize="small"
|
||||||
|
buttonStyle="secondary"
|
||||||
tooltip={tooltip}
|
tooltip={tooltip}
|
||||||
css={css`
|
css={css`
|
||||||
span > :first-of-type {
|
span > :first-of-type {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { styled, css, SupersetTheme } from '@superset-ui/core';
|
import { styled, css, SupersetTheme, useTheme } from '@superset-ui/core';
|
||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
import { Interweave } from 'interweave';
|
import { Interweave } from 'interweave';
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
@@ -84,19 +84,39 @@ export default function Toast({ toast, onCloseToast }: ToastPresenterProps) {
|
|||||||
};
|
};
|
||||||
}, [handleClosePress, toast.duration]);
|
}, [handleClosePress, toast.duration]);
|
||||||
|
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
let className = 'toast--success';
|
let className = 'toast--success';
|
||||||
let icon = (
|
let icon = (
|
||||||
<Icons.CheckCircleFilled css={theme => notificationStyledIcon(theme)} />
|
<Icons.CheckCircleFilled
|
||||||
|
css={theme => notificationStyledIcon(theme)}
|
||||||
|
iconColor={theme.colorSuccess}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (toast.toastType === ToastType.Warning) {
|
if (toast.toastType === ToastType.Warning) {
|
||||||
icon = <Icons.ExclamationCircleFilled css={notificationStyledIcon} />;
|
icon = (
|
||||||
|
<Icons.ExclamationCircleFilled
|
||||||
|
css={notificationStyledIcon}
|
||||||
|
iconColor={theme.colorWarning}
|
||||||
|
/>
|
||||||
|
);
|
||||||
className = 'toast--warning';
|
className = 'toast--warning';
|
||||||
} else if (toast.toastType === ToastType.Danger) {
|
} else if (toast.toastType === ToastType.Danger) {
|
||||||
icon = <Icons.ExclamationCircleFilled css={notificationStyledIcon} />;
|
icon = (
|
||||||
|
<Icons.ExclamationCircleFilled
|
||||||
|
css={notificationStyledIcon}
|
||||||
|
iconColor={theme.colorError}
|
||||||
|
/>
|
||||||
|
);
|
||||||
className = 'toast--danger';
|
className = 'toast--danger';
|
||||||
} else if (toast.toastType === ToastType.Info) {
|
} else if (toast.toastType === ToastType.Info) {
|
||||||
icon = <Icons.InfoCircleFilled css={notificationStyledIcon} />;
|
icon = (
|
||||||
|
<Icons.InfoCircleFilled
|
||||||
|
css={notificationStyledIcon}
|
||||||
|
iconColor={theme.colorInfo}
|
||||||
|
/>
|
||||||
|
);
|
||||||
className = 'toast--info';
|
className = 'toast--info';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ interface MenuProps {
|
|||||||
|
|
||||||
const StyledHeader = styled.header`
|
const StyledHeader = styled.header`
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
background-color: ${theme.colorBgElevated};
|
background-color: ${theme.colorBgContainer};
|
||||||
margin-bottom: 2px;
|
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
&:nth-last-of-type(2) nav {
|
&:nth-last-of-type(2) nav {
|
||||||
|
|||||||
Reference in New Issue
Block a user