fix(code-snippet-skeleton): CodeSnippetSkeleton can only be single or multi

This commit is contained in:
Eric Liu 2020-12-05 15:13:00 -08:00
commit 41cb74646b
4 changed files with 7 additions and 7 deletions

View file

@ -528,8 +528,8 @@ 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" &#124; "inline" &#124; "multi"</code> | <code>"single"</code> | Set the type of code snippet | | type | <code>let</code> | No | <code>"single" &#124; "multi"</code> | <code>"single"</code> | Set the type of code snippet |
### Slots ### Slots

View file

@ -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,

View file

@ -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}

View file

@ -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 {