mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
fix(code-snippet-skeleton): CodeSnippetSkeleton can only be single or multi
This commit is contained in:
parent
e205043287
commit
41cb74646b
4 changed files with 7 additions and 7 deletions
|
@ -527,9 +527,9 @@ None.
|
||||||
|
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||||
| :-------- | :--------------- | :------- | :--------------------------------------------------- | --------------------- | ---------------------------- |
|
| :-------- | :--------------- | :------- | :----------------------------------- | --------------------- | ---------------------------- |
|
||||||
| type | <code>let</code> | No | <code>"single" | "inline" | "multi"</code> | <code>"single"</code> | Set the type of code snippet |
|
| type | <code>let</code> | No | <code>"single" | "multi"</code> | <code>"single"</code> | Set the type of code snippet |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
|
|
@ -1889,7 +1889,7 @@
|
||||||
"name": "type",
|
"name": "type",
|
||||||
"kind": "let",
|
"kind": "let",
|
||||||
"description": "Set the type of code snippet",
|
"description": "Set the type of code snippet",
|
||||||
"type": "\"single\" | \"inline\" | \"multi\"",
|
"type": "\"single\" | \"multi\"",
|
||||||
"value": "\"single\"",
|
"value": "\"single\"",
|
||||||
"isFunction": false,
|
"isFunction": false,
|
||||||
"constant": false,
|
"constant": false,
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* Set the type of code snippet
|
* Set the type of code snippet
|
||||||
* @type {"single" | "inline" | "multi"}
|
* @type {"single" | "multi"}
|
||||||
*/
|
*/
|
||||||
export let type = "single";
|
export let type = "single";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class:bx--snippet="{true}"
|
|
||||||
class:bx--skeleton="{true}"
|
class:bx--skeleton="{true}"
|
||||||
|
class:bx--snippet="{true}"
|
||||||
class:bx--snippet--single="{type === 'single'}"
|
class:bx--snippet--single="{type === 'single'}"
|
||||||
class:bx--snippet--multi="{type === 'multi'}"
|
class:bx--snippet--multi="{type === 'multi'}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
|
|
2
types/CodeSnippet/CodeSnippetSkeleton.d.ts
vendored
2
types/CodeSnippet/CodeSnippetSkeleton.d.ts
vendored
|
@ -5,7 +5,7 @@ export interface CodeSnippetSkeletonProps extends svelte.JSX.HTMLAttributes<HTML
|
||||||
* Set the type of code snippet
|
* Set the type of code snippet
|
||||||
* @default "single"
|
* @default "single"
|
||||||
*/
|
*/
|
||||||
type?: "single" | "inline" | "multi";
|
type?: "single" | "multi";
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class CodeSnippetSkeleton {
|
export default class CodeSnippetSkeleton {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue