feat(code-snippet): support disabled state for single and multi-line types

This commit is contained in:
Eric Liu 2021-01-22 14:38:26 -08:00
commit 3dde418398
6 changed files with 37 additions and 2 deletions

View file

@ -1949,6 +1949,16 @@
"constant": false,
"reactive": false
},
{
"name": "disabled",
"kind": "let",
"description": "Set to `true` for the disabled variant\nOnly applies to the \"single\", \"multi\" types",
"type": "boolean",
"value": "false",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "wrapText",
"kind": "let",

View file

@ -47,6 +47,14 @@ let comment = `
<CodeSnippet type="multi" {code} hideCopyButton />
### Disabled
The `disabled` prop applies only to the `"single"` and `"multi"` code snippet types.
<CodeSnippet disabled>yarn add -D carbon-components-svelte</CodeSnippet>
<br />
<CodeSnippet disabled type="multi" code="{comment}" />
### Wrapped text
`wrapText` only applies to the `"multi"` type.