mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
chore: improve Contributors loading suspense style (#51663)
This commit is contained in:
parent
1d5a518159
commit
f474bf18d8
@ -8,9 +8,6 @@ import SiteContext from '../SiteContext';
|
|||||||
import ContributorAvatar from './ContributorAvatar';
|
import ContributorAvatar from './ContributorAvatar';
|
||||||
|
|
||||||
const useStyle = createStyles(({ token, css }) => ({
|
const useStyle = createStyles(({ token, css }) => ({
|
||||||
contributorsList: css`
|
|
||||||
margin-top: 120px !important;
|
|
||||||
`,
|
|
||||||
listMobile: css`
|
listMobile: css`
|
||||||
margin: 1em 0 !important;
|
margin: 1em 0 !important;
|
||||||
`,
|
`,
|
||||||
@ -50,7 +47,7 @@ const Contributors: React.FC<ContributorsProps> = ({ filename }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames(styles.contributorsList, { [styles.listMobile]: isMobile })}>
|
<div className={classNames({ [styles.listMobile]: isMobile })}>
|
||||||
<div className={styles.title}>{formatMessage({ id: 'app.content.contributors' })}</div>
|
<div className={styles.title}>{formatMessage({ id: 'app.content.contributors' })}</div>
|
||||||
<ContributorsList
|
<ContributorsList
|
||||||
cache
|
cache
|
||||||
|
@ -94,9 +94,11 @@ const Content: React.FC<React.PropsWithChildren> = ({ children }) => {
|
|||||||
juejinLink={meta.frontmatter.juejin_url}
|
juejinLink={meta.frontmatter.juejin_url}
|
||||||
/>
|
/>
|
||||||
</InViewSuspense>
|
</InViewSuspense>
|
||||||
<InViewSuspense fallback={<div style={{ height: 50, marginTop: 120 }} />}>
|
<div style={{ marginTop: 120 }}>
|
||||||
|
<InViewSuspense fallback={<div style={{ height: 50 }} />}>
|
||||||
<Contributors filename={meta.frontmatter.filename} />
|
<Contributors filename={meta.frontmatter.filename} />
|
||||||
</InViewSuspense>
|
</InViewSuspense>
|
||||||
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<InViewSuspense fallback={null}>
|
<InViewSuspense fallback={null}>
|
||||||
<PrevAndNext rtl={isRTL} />
|
<PrevAndNext rtl={isRTL} />
|
||||||
|
Loading…
Reference in New Issue
Block a user