mirror of
https://github.com/apache/superset.git
synced 2026-04-26 19:44:58 +00:00
fix(sqllab): tab layout truncated (#32005)
This commit is contained in:
@@ -35,6 +35,7 @@ export interface ErrorAlertProps {
|
||||
children?: React.ReactNode; // Additional content to show in the modal
|
||||
closable?: boolean; // Show close button, default true
|
||||
showIcon?: boolean; // Show icon, default true
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const ErrorAlert: React.FC<ErrorAlertProps> = ({
|
||||
@@ -49,6 +50,7 @@ const ErrorAlert: React.FC<ErrorAlertProps> = ({
|
||||
children,
|
||||
closable = true,
|
||||
showIcon = true,
|
||||
className,
|
||||
}) => {
|
||||
const [isDescriptionVisible, setIsDescriptionVisible] = useState(
|
||||
!descriptionDetailsCollapsed,
|
||||
@@ -66,7 +68,7 @@ const ErrorAlert: React.FC<ErrorAlertProps> = ({
|
||||
const color =
|
||||
type === 'warning' ? theme.colors.warning.base : theme.colors.error.base;
|
||||
return (
|
||||
<div style={{ cursor: 'pointer' }}>
|
||||
<div className={className} style={{ cursor: 'pointer' }}>
|
||||
<span style={{ color }}>{icon} </span>
|
||||
{errorType}
|
||||
</div>
|
||||
@@ -100,13 +102,13 @@ const ErrorAlert: React.FC<ErrorAlertProps> = ({
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
const renderAlert = (closable: boolean) => (
|
||||
<Alert
|
||||
description={renderDescription()}
|
||||
type={type}
|
||||
showIcon
|
||||
closable={closable}
|
||||
className={className}
|
||||
>
|
||||
<strong>{errorType}</strong>
|
||||
{message && (
|
||||
|
||||
Reference in New Issue
Block a user