docs(snippet): add docs for custom symbol and toast

This commit is contained in:
Augusto
2020-06-23 20:34:30 -03:00
committed by unix
parent 149349af12
commit 82f8a98227

View File

@@ -60,6 +60,20 @@ Display a snippet of copyable code for the command line.
<Snippet copy="prevent" text="yarn add @zeit-ui/react" width="300px" />
`} />
<Playground
title="custom symbol"
scope={{ Snippet }}
code={`
<Snippet symbol=">" text="yarn add @zeit-ui/react" width="300px" />
`} />
<Playground
title="custom toast"
scope={{ Snippet }}
code={`
<Snippet toastText="Code copied!" toastType="secondary" text="yarn add @zeit-ui/react" width="300px" />
`} />
<Playground
title="filled"
scope={{ Snippet, Spacer }}
@@ -85,6 +99,9 @@ Display a snippet of copyable code for the command line.
| **filled** | filled style | `boolean` | - | `false` |
| **width** | set CSS string | `string` | - | `initial` |
| **copy** | function of copy button | `CopyTypes` | `'default', 'slient', 'prevent'` | `default` |
| **symbol** | symbol snippet | `string` | - | `$` |
| **toastText** | toast text | `string` | - | `Copied to clipboard!` |
| **toastType** | toast type | `NormalTypes` | `'default', 'secondary', 'success', 'warning', 'error'` | `success` |
| ... | native props | `HTMLAttributes` | `'id', 'name', 'className', ...` | - |
<Attributes.Title>SnippetTypes</Attributes.Title>