Skip to content

Commit e031ac2

Browse files
committed
chore(switch): fix JSDoc description for slot
1 parent 54ea3e1 commit e031ac2

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

COMPONENT_INDEX.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3867,13 +3867,13 @@ None.
38673867

38683868
### Props
38693869

3870-
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
3871-
| :-------- | :------- | :--------------- | :------- | ------------------------------------------ | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3872-
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the button HTML element |
3873-
| selected | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` for the switch to be selected |
3874-
| text | No | <code>let</code> | No | <code>string</code> | <code>"Provide text"</code> | Specify the switch text.<br />Alternatively, use the "text" slot.<br />@example <br />`svelte<br />&lt;Switch&gt;<br /> &lt;span slot="text"&gt;Custom Text&lt;/span&gt;<br />&lt;/Switch&gt;<br />` |
3875-
| disabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the switch |
3876-
| id | No | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the button element |
3870+
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
3871+
| :-------- | :------- | :--------------- | :------- | ------------------------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
3872+
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the button HTML element |
3873+
| selected | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` for the switch to be selected |
3874+
| text | No | <code>let</code> | No | <code>string</code> | <code>"Provide text"</code> | Specify the switch text.<br />Alternatively, use the default slot.<br />@example <br />`svelte<br />&lt;Switch&gt;<br /> &lt;span&gt;Custom Text&lt;/span&gt;<br />&lt;/Switch&gt;<br />` |
3875+
| disabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the switch |
3876+
| id | No | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the button element |
38773877

38783878
### Slots
38793879

docs/src/COMPONENT_API.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15416,7 +15416,7 @@
1541615416
{
1541715417
"name": "text",
1541815418
"kind": "let",
15419-
"description": "Specify the switch text.\nAlternatively, use the \"text\" slot.\n@example \n```svelte\n<Switch>\n <span slot=\"text\">Custom Text</span>\n</Switch>\n```",
15419+
"description": "Specify the switch text.\nAlternatively, use the default slot.\n@example \n```svelte\n<Switch>\n <span>Custom Text</span>\n</Switch>\n```",
1542015420
"type": "string",
1542115421
"value": "\"Provide text\"",
1542215422
"isFunction": false,

src/ContentSwitcher/Switch.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script>
22
/**
33
* Specify the switch text.
4-
* Alternatively, use the "text" slot.
4+
* Alternatively, use the default slot.
55
* @example
66
* ```svelte
77
* <Switch>
8-
* <span slot="text">Custom Text</span>
8+
* <span>Custom Text</span>
99
* </Switch>
1010
* ```
1111
*/

types/ContentSwitcher/Switch.svelte.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ type $RestProps = SvelteHTMLElements["button"];
66
type $Props = {
77
/**
88
* Specify the switch text.
9-
* Alternatively, use the "text" slot.
9+
* Alternatively, use the default slot.
1010
* @example
1111
* ```svelte
1212
* <Switch>
13-
* <span slot="text">Custom Text</span>
13+
* <span>Custom Text</span>
1414
* </Switch>
1515
* ```
1616
* @default "Provide text"

0 commit comments

Comments
 (0)