fix(sqllab): tab layout truncated (#32005)

This commit is contained in:
JUST.in DO IT
2025-01-28 06:02:38 -08:00
committed by GitHub
parent 1b375b715c
commit aa74ba3da2
4 changed files with 23 additions and 9 deletions

View File

@@ -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 && (