diff --git a/pages/en-us/components/snippet.mdx b/pages/en-us/components/snippet.mdx index 91195a5..69df6cb 100644 --- a/pages/en-us/components/snippet.mdx +++ b/pages/en-us/components/snippet.mdx @@ -100,17 +100,17 @@ Display a snippet of copyable code for the command line. Snippet.Props -| Attribute | Description | Type | Accepted values | Default | -| ------------- | ----------------------- | ----------------------------- | ------------------------------------------------------- | ---------------------- | -| **text** | code snippet | `string` `Array` | - | - | -| **type** | snippet types | [SnippetTypes](#snippettypes) | [SnippetTypes](#snippettypes) | `default` | -| **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', ...` | - | +| Attribute | Description | Type | Accepted values | Default | +| ------------- | ----------------------- | ----------------------------- | -------------------------------- | ---------------------- | +| **text** | code snippet | `string` `Array` | - | - | +| **type** | snippet types | [SnippetTypes](#snippettypes) | [SnippetTypes](#snippettypes) | `default` | +| **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` | [NormalTypes](#normaltypes) | `success` | +| ... | native props | `HTMLAttributes` | `'id', 'name', 'className', ...` | - | SnippetTypes @@ -118,6 +118,12 @@ Display a snippet of copyable code for the command line. type SnippetTypes = 'default' | 'secondary' | 'success' | 'warning' | 'error' | 'dark' | 'lite' ``` +NormalTypes + +```ts +type NormalTypes = 'default' | 'secondary' | 'success' | 'warning' | 'error' +``` + export default ({ children }) => {children} diff --git a/pages/zh-cn/components/snippet.mdx b/pages/zh-cn/components/snippet.mdx index 2afaace..ee481ad 100644 --- a/pages/zh-cn/components/snippet.mdx +++ b/pages/zh-cn/components/snippet.mdx @@ -84,14 +84,17 @@ export const meta = { Snippet.Props -| 属性 | 描述 | 类型 | 推荐值 | 默认 | -| ---------- | ------------------ | ----------------------------- | -------------------------------- | --------- | -| **text** | 命令文本 | `string` `Array` | - | - | -| **type** | 组件类型 | [SnippetTypes](#snippettypes) | [SnippetTypes](#snippettypes) | `default` | -| **filled** | 填充风格的样式 | `boolean` | - | `false` | -| **width** | 设置 CSS 宽度 | `string` | - | `initial` | -| **copy** | 拷贝按钮的工作方式 | `CopyTypes` | `'default', 'slient', 'prevent'` | `default` | -| ... | 原生属性 | `HTMLAttributes` | `'id', 'name', 'className', ...` | - | +| 属性 | 描述 | 类型 | 推荐值 | 默认 | +| ------------- | ------------------ | ----------------------------- | -------------------------------- | ---------------------- | +| **text** | 命令文本 | `string` `Array` | - | - | +| **type** | 组件类型 | [SnippetTypes](#snippettypes) | [SnippetTypes](#snippettypes) | `default` | +| **filled** | 填充风格的样式 | `boolean` | - | `false` | +| **width** | 设置 CSS 宽度 | `string` | - | `initial` | +| **copy** | 拷贝按钮的工作方式 | `CopyTypes` | `'default', 'slient', 'prevent'` | `default` | +| **symbol** | 组件左侧显示的字符 | `string` | - | `$` | +| **toastText** | 拷贝提示的字符 | `string` | - | `Copied to clipboard!` | +| **toastType** | 拷贝提示的类型 | `NormalTypes` | [NormalTypes](#normaltypes) | `success` | +| ... | 原生属性 | `HTMLAttributes` | `'id', 'name', 'className', ...` | - | SnippetTypes @@ -99,6 +102,12 @@ export const meta = { type SnippetTypes = 'default' | 'secondary' | 'success' | 'warning' | 'error' | 'dark' | 'lite' ``` +NormalTypes + +```ts +type NormalTypes = 'default' | 'secondary' | 'success' | 'warning' | 'error' +``` + export default ({ children }) => {children}