mirror of
https://github.com/zhigang1992/react.git
synced 2026-02-11 22:32:32 +08:00
64 lines
1.8 KiB
Plaintext
64 lines
1.8 KiB
Plaintext
import { Layout, Playground, Attributes } from 'lib/components'
|
|
import { Link, Text } from 'components'
|
|
|
|
export const meta = {
|
|
title: 'link',
|
|
description: 'tenotext',
|
|
}
|
|
|
|
## Link
|
|
|
|
Hyperlinks between pages.
|
|
|
|
<Playground
|
|
desc="Use `Text` to standardize text content."
|
|
scope={{ Link }}
|
|
code={`
|
|
<Link href="#">The Evil Rabbit Jumped over the Fence.</Link>
|
|
`} />
|
|
|
|
<Playground
|
|
title="highlight"
|
|
desc="Use `Text` to standardize text content."
|
|
scope={{ Link }}
|
|
code={`
|
|
<Link href="#" color>The Evil Rabbit Jumped over the Fence.</Link>
|
|
`} />
|
|
|
|
<Playground
|
|
title="variant"
|
|
desc="Use `Text` to standardize text content."
|
|
scope={{ Link, Text }}
|
|
code={`
|
|
<>
|
|
<Text><Link href="#" pure>The Evil Rabbit Jumped over the Fence.</Link></Text>
|
|
<Text><Link href="#" color pure>The Evil Rabbit Jumped over the Fence.</Link></Text>
|
|
<Text><Link href="#" pure underline>The Evil Rabbit Jumped over the Fence.</Link></Text>
|
|
<Text><Link href="#" underline>The Evil Rabbit Jumped over the Fence.</Link></Text>
|
|
</>
|
|
`} />
|
|
|
|
<Playground
|
|
title="block"
|
|
desc="Display as a separate block."
|
|
scope={{ Link }}
|
|
code={`
|
|
<Link href="#" pure block>The Evil Rabbit Jumped over the Fence.</Link>
|
|
`} />
|
|
|
|
<Attributes edit="/pages/docs/components/link.mdx">
|
|
<Attributes.Title>Link.Props</Attributes.Title>
|
|
|
|
| Attribute | Description | Type | Accepted values | Default
|
|
| ---------- | ---------- | ---- | -------------- | ------ |
|
|
| **href** | link url | `string` | - | - |
|
|
| **color** | display color for link | `boolean` | - | `false` |
|
|
| **pure** | hide icon | `boolean` | - | `false` |
|
|
| **underline** | display underline | `boolean` | - | `false` |
|
|
| **block** | display as a separate block | `boolean` | - | `false` |
|
|
| ... | native props | `AnchorHTMLAttributes` | `'rel', 'target', ...` | - |
|
|
|
|
</Attributes>
|
|
|
|
export default ({ children }) => <Layout meta={meta}>{children}</Layout>
|