@livekit/components-js-docs 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,8 +43,8 @@ _(Optional)_
|
|
|
43
43
|
|
|
44
44
|
{% /parameter %}
|
|
45
45
|
|
|
46
|
-
{% parameter name="onChange" type="(enabled: boolean) => void" optional=true %}
|
|
47
|
-
_(Optional)_
|
|
46
|
+
{% parameter name="onChange" type="(enabled: boolean, isUserInitiated: boolean) => void" optional=true %}
|
|
47
|
+
_(Optional)_ Function that is called when the enabled state of the toggle changes. The second function argument `isUserInitiated` is `true` if the change was initiated by a user interaction, such as a click.
|
|
48
48
|
|
|
49
49
|
{% /parameter %}
|
|
50
50
|
|
|
@@ -21,10 +21,10 @@ export interface TrackToggleProps<T extends ToggleSource> extends Omit<React.But
|
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
24
|
-
| Property | Type
|
|
25
|
-
| ------------------------------------------------------------- |
|
|
26
|
-
| [captureOptions?](./react/tracktoggleprops.captureoptions.md) | CaptureOptionsBySource<T>
|
|
27
|
-
| [initialState?](./react/tracktoggleprops.initialstate.md) | boolean
|
|
28
|
-
| [onChange?](./react/tracktoggleprops.onchange.md) | (enabled: boolean) => void
|
|
29
|
-
| [showIcon?](./react/tracktoggleprops.showicon.md) | boolean
|
|
30
|
-
| [source](./react/tracktoggleprops.source.md) | T
|
|
24
|
+
| Property | Type | Description |
|
|
25
|
+
| ------------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| [captureOptions?](./react/tracktoggleprops.captureoptions.md) | CaptureOptionsBySource<T> | _(Optional)_ |
|
|
27
|
+
| [initialState?](./react/tracktoggleprops.initialstate.md) | boolean | _(Optional)_ |
|
|
28
|
+
| [onChange?](./react/tracktoggleprops.onchange.md) | (enabled: boolean, isUserInitiated: boolean) => void | _(Optional)_ Function that is called when the enabled state of the toggle changes. The second function argument <code>isUserInitiated</code> is <code>true</code> if the change was initiated by a user interaction, such as a click. |
|
|
29
|
+
| [showIcon?](./react/tracktoggleprops.showicon.md) | boolean | _(Optional)_ |
|
|
30
|
+
| [source](./react/tracktoggleprops.source.md) | T | |
|
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
# TrackToggleProps.onChange property
|
|
8
8
|
|
|
9
|
+
Function that is called when the enabled state of the toggle changes. The second function argument `isUserInitiated` is `true` if the change was initiated by a user interaction, such as a click.
|
|
10
|
+
|
|
9
11
|
**Signature:**
|
|
10
12
|
|
|
11
13
|
```typescript
|
|
12
|
-
onChange?: (enabled: boolean) => void;
|
|
14
|
+
onChange?: (enabled: boolean, isUserInitiated: boolean) => void;
|
|
13
15
|
```
|
|
16
|
+
|
|
17
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livekit/components-js-docs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Automatically generated documentation pages for LiveKit Components JS. Intended to be consumed by the documentation page.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"directory": "/docs/beta-docs"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@livekit/components-react": "1.
|
|
11
|
+
"@livekit/components-react": "1.5.0"
|
|
12
12
|
},
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "Apache-2.0",
|