docs(image): add api for anchor props

This commit is contained in:
unix
2020-06-13 06:33:03 +08:00
parent 8ee86f24a1
commit 2f4bb4892c
2 changed files with 3 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ Display image content.
desc="Add a browser style wrapper to the image."
scope={{ Image, Display, Code }}
code={`
<Image.Browser url="https://react.zeit-ui.co/en-us/guide/introduction" >
<Image.Browser url="https://react.zeit-ui.co/en-us/guide/introduction" anchorProps={{ rel: 'nofollow' }}>
<Image width="540" height="246" src="https://user-images.githubusercontent.com/11304944/76085431-fd036480-5fec-11ea-8412-9e581425344a.png" />
</Image.Browser>
`} />
@@ -77,6 +77,7 @@ Display image content.
| **url** | show url on browser address input | `string` | - | - |
| **showFullLink** | show full url | `boolean` | - | `false` |
| **invert** | invert colors | `boolean` | - | `false` |
| **anchorProps** | props of element `a` | `AnchorHTMLAttributes` | - | `{}` |
| ... | native props | `HTMLAttributes` | `'id', 'className', ...` | - |
</Attributes>

View File

@@ -76,6 +76,7 @@ export const meta = {
| **url** | 在浏览器地址栏显示链接 | `string` | - | - |
| **showFullLink** | 显示完整的链接而非域名 | `boolean` | - | `false` |
| **invert** | 反转所有颜色 | `boolean` | - | `false` |
| **anchorProps** | 设置 `a` 的其他属性 | `AnchorHTMLAttributes` | - | `{}` |
| ... | 原生属性 | `HTMLAttributes` | `'id', 'className', ...` | - |
</Attributes>