mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix: DB icon sizes in database add modal (#34854)
(cherry picked from commit ab58b0a8a3)
This commit is contained in:
committed by
Joe Li
parent
37347525e7
commit
7169d9f2bd
@@ -50,17 +50,7 @@ const IconButton: React.FC<IconButtonProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const renderIcon = () => {
|
const renderIcon = () => {
|
||||||
const iconContent = icon ? (
|
const iconContent = (
|
||||||
<img
|
|
||||||
src={icon as string}
|
|
||||||
alt={altText || buttonText}
|
|
||||||
css={css`
|
|
||||||
width: 100%;
|
|
||||||
object-fit: contain;
|
|
||||||
height: 100px;
|
|
||||||
`}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<div
|
<div
|
||||||
css={css`
|
css={css`
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -69,12 +59,19 @@ const IconButton: React.FC<IconButtonProps> = ({
|
|||||||
height: 100px;
|
height: 100px;
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
<Icons.DatabaseOutlined
|
{icon ? (
|
||||||
css={css`
|
<img
|
||||||
font-size: 48px;
|
src={icon as string}
|
||||||
`}
|
alt={altText || buttonText}
|
||||||
aria-label="default-icon"
|
css={css`
|
||||||
/>
|
width: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
height: 48px;
|
||||||
|
`}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Icons.DatabaseOutlined iconSize="xxl" aria-label="default-icon" />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user