mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(code-snippet): add wrapText prop
This commit is contained in:
parent
e1ee3a6092
commit
48bd19f75e
4 changed files with 32 additions and 2 deletions
|
@ -19,6 +19,12 @@ export function add(a: number, b: number) {
|
|||
export function subtract(a: number, b: number) {
|
||||
return a - b;
|
||||
}`;
|
||||
|
||||
let comment = `
|
||||
> \`carbon-components-svelte\` is a Svelte component library that implements the [Carbon Design System](https://github.com/carbon-design-system), an open source design system by IBM.
|
||||
|
||||
> A design system can facilitate frontend development and prototyping because it is encourages reuse, consistency, and extensibility.
|
||||
`
|
||||
</script>
|
||||
|
||||
<InlineNotification svx-ignore lowContrast title="Note:" subtitle="By design, the copy button does not copy text to the clipboard. You will need to write your own logic." kind="info" hideCloseButton />
|
||||
|
@ -39,6 +45,12 @@ export function subtract(a: number, b: number) {
|
|||
|
||||
<CodeSnippet type="multi" {code} hideCopyButton />
|
||||
|
||||
### Wrap text
|
||||
|
||||
Note that `wrapText` only applies to the `"multi"` type.
|
||||
|
||||
<CodeSnippet wrapText type="multi" code="{comment}" />
|
||||
|
||||
### Skeleton
|
||||
|
||||
<CodeSnippet skeleton />
|
Loading…
Add table
Add a link
Reference in a new issue