docs: adjust mig & anchor (#39732)

This commit is contained in:
二货爱吃白萝卜 2022-12-22 15:31:40 +08:00 committed by GitHub
parent 6236e356b5
commit 540e3aae46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

View File

@ -106,6 +106,7 @@ const Content: React.FC<{ children: ReactNode }> = ({ children }) => {
const { pathname, hash } = useLocation();
const { formatMessage } = useIntl();
const styles = useStyle();
const { token } = useSiteToken();
const { direction } = useContext(SiteContext);
const [showDebug, setShowDebug] = useState(false);
@ -149,7 +150,7 @@ const Content: React.FC<{ children: ReactNode }> = ({ children }) => {
<Col xxl={20} xl={19} lg={18} md={18} sm={24} xs={24}>
<Affix>
<section css={styles.tocWrapper} className={classNames({ rtl: isRTL })}>
<Anchor css={styles.toc} affix={false} showInkInFixed>
<Anchor css={styles.toc} affix={false} targetOffset={token.marginXXL} showInkInFixed>
{anchorItems.map((item) => (
<Anchor.Link href={`#${item.id}`} title={item?.title} key={item.id}>
{item.children

View File

@ -335,7 +335,7 @@ root.render(
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| `Component` (可以是任意 antd 组件名,如 `Button`) | 用于修改 Component Token 以及覆盖该组件消费的 Alias Token | `ComponentToken & AliasToken` | - |
| `Component` (Can be any antd Component name like `Button`) | Modify Component Token or override Component used Alias Token | `ComponentToken & AliasToken` | - |
### SeedToken
@ -343,16 +343,20 @@ root.render(
### MapToken
> 继承所有 SeedToken 的 Property
> Inherit all SeedToken properties
<TokenTable type="map"></TokenTable>
### AliasToken
> 继承所有 SeedToken 和 MapToken 的 Property
> Inherit all SeedToken and MapToken properties
<TokenTable type="alias"></TokenTable>
### StyleProvider
Please ref [`@ant-design/cssinjs`](https://github.com/ant-design/cssinjs#styleprovider).
## How to Debug your Theme
We provide tools to help users debug themes: [Theme Editor](/theme-editor)

View File

@ -353,6 +353,10 @@ root.render(
<TokenTable type="alias"></TokenTable>
### StyleProvider
请参考 [`@ant-design/cssinjs`](https://github.com/ant-design/cssinjs#styleprovider)。
## 调试主题
我们提供了帮助用户调试主题的工具:[主题编辑器](/theme-editor-cn)