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
|
||||
|
||||
| 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 |
|
||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||
| :-------- | :--------------- | :------- | :----------------------------------- | --------------------- | ---------------------------- |
|
||||
| type | <code>let</code> | No | <code>"single" | "multi"</code> | <code>"single"</code> | Set the type of code snippet |
|
||||
|
||||
### Slots
|
||||
|
||||
|
|
|
@ -1889,7 +1889,7 @@
|
|||
"name": "type",
|
||||
"kind": "let",
|
||||
"description": "Set the type of code snippet",
|
||||
"type": "\"single\" | \"inline\" | \"multi\"",
|
||||
"type": "\"single\" | \"multi\"",
|
||||
"value": "\"single\"",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script>
|
||||
/**
|
||||
* Set the type of code snippet
|
||||
* @type {"single" | "inline" | "multi"}
|
||||
* @type {"single" | "multi"}
|
||||
*/
|
||||
export let type = "single";
|
||||
</script>
|
||||
|
||||
<div
|
||||
class:bx--snippet="{true}"
|
||||
class:bx--skeleton="{true}"
|
||||
class:bx--snippet="{true}"
|
||||
class:bx--snippet--single="{type === 'single'}"
|
||||
class:bx--snippet--multi="{type === 'multi'}"
|
||||
{...$$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
|
||||
* @default "single"
|
||||
*/
|
||||
type?: "single" | "inline" | "multi";
|
||||
type?: "single" | "multi";
|
||||
}
|
||||
|
||||
export default class CodeSnippetSkeleton {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue