docs: fix alignment for framework icons in homepage (#53534)

* docs: fix alignment for framework icons in homepage

Signed-off-by: Peach <scdzwyxst@gmail.com>

* docs: update offset

Signed-off-by: Peach <scdzwyxst@gmail.com>

---------

Signed-off-by: Peach <scdzwyxst@gmail.com>
This commit is contained in:
Peach 2025-04-17 11:03:45 +08:00 committed by GitHub
parent 482548f052
commit 3fecf05304
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,7 @@ const SECONDARY_LIST = [
key: 'mobile',
url: 'https://mobile.ant.design/',
imgScale: 1.5,
scaleOrigin: '15px',
},
{
img: 'https://gw.alipayobjects.com/zos/antfincdn/FLrTNDvlna/antv.png',
@ -151,7 +152,7 @@ const DesignFramework: React.FC = () => {
);
})}
{SECONDARY_LIST.map(({ img, key, url, imgScale = 1 }, index) => {
{SECONDARY_LIST.map(({ img, key, url, imgScale = 1, scaleOrigin }, index) => {
const title = locale[key as keyof typeof locale];
const desc = locale[`${key}Desc` as keyof typeof locale];
@ -162,7 +163,7 @@ const DesignFramework: React.FC = () => {
draggable={false}
alt={title}
src={img}
style={{ transform: `scale(${imgScale})` }}
style={{ transform: `scale(${imgScale})`, transformOrigin: scaleOrigin }}
/>
<Typography.Title