mirror of
https://github.com/apache/superset.git
synced 2026-04-27 03:55:47 +00:00
chore: removing use of supersetTheme in favor of ThemeProvider (#17000)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import React, { useState, ReactNode } from 'react';
|
||||
import { styled, supersetTheme, t } from '@superset-ui/core';
|
||||
import { styled, useTheme, t } from '@superset-ui/core';
|
||||
import { noOp } from 'src/utils/common';
|
||||
import Modal from 'src/components/Modal';
|
||||
import Button from 'src/components/Button';
|
||||
@@ -97,6 +97,8 @@ export default function ErrorAlert({
|
||||
subtitle,
|
||||
title,
|
||||
}: ErrorAlertProps) {
|
||||
const theme = useTheme();
|
||||
|
||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||
const [isBodyExpanded, setIsBodyExpanded] = useState(false);
|
||||
|
||||
@@ -109,12 +111,12 @@ export default function ErrorAlert({
|
||||
{level === 'error' ? (
|
||||
<Icons.ErrorSolid
|
||||
className="icon"
|
||||
iconColor={supersetTheme.colors[level].base}
|
||||
iconColor={theme.colors[level].base}
|
||||
/>
|
||||
) : (
|
||||
<Icons.WarningSolid
|
||||
className="icon"
|
||||
iconColor={supersetTheme.colors[level].base}
|
||||
iconColor={theme.colors[level].base}
|
||||
/>
|
||||
)}
|
||||
<strong>{title}</strong>
|
||||
@@ -172,12 +174,12 @@ export default function ErrorAlert({
|
||||
{level === 'error' ? (
|
||||
<Icons.ErrorSolid
|
||||
className="icon"
|
||||
iconColor={supersetTheme.colors[level].base}
|
||||
iconColor={theme.colors[level].base}
|
||||
/>
|
||||
) : (
|
||||
<Icons.WarningSolid
|
||||
className="icon"
|
||||
iconColor={supersetTheme.colors[level].base}
|
||||
iconColor={theme.colors[level].base}
|
||||
/>
|
||||
)}
|
||||
<div className="title">{title}</div>
|
||||
|
||||
Reference in New Issue
Block a user