mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
docs(code-snippet): add "Custom show more/less text" example (#1918)
This commit is contained in:
parent
1901bcddb6
commit
4e6bfd0612
1 changed files with 6 additions and 0 deletions
|
@ -94,6 +94,12 @@ Only multi-line code snippets have a "Show more" button by default. Set `showMor
|
|||
|
||||
<CodeSnippet type="multi" {code} hideCopyButton showMoreLess={false} />
|
||||
|
||||
## Custom show more/less text
|
||||
|
||||
Use the `showMoreText` and `showLessText` props to override the default "Show more" and "Show less" button text.
|
||||
|
||||
<CodeSnippet type="multi" {code} showMoreText="Expand" showLessText="Collapse" />
|
||||
|
||||
## Disabled
|
||||
|
||||
The `disabled` prop applies only to the `"single"` and `"multi"` code snippet types.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue