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