@stream-io/video-react-sdk 0.3.44 → 0.3.46

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.
@@ -35,6 +35,7 @@ export declare const translations: {
35
35
  You: string;
36
36
  Me: string;
37
37
  Unknown: string;
38
+ "Toggle device menu": string;
38
39
  Allow: string;
39
40
  Revoke: string;
40
41
  Dismiss: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-sdk",
3
- "version": "0.3.44",
3
+ "version": "0.3.46",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",
@@ -31,8 +31,8 @@
31
31
  "@floating-ui/react": "^0.22.0",
32
32
  "@nivo/core": "^0.80.0",
33
33
  "@nivo/line": "^0.80.0",
34
- "@stream-io/video-client": "^0.3.35",
35
- "@stream-io/video-react-bindings": "^0.2.36",
34
+ "@stream-io/video-client": "^0.3.36",
35
+ "@stream-io/video-react-bindings": "^0.2.37",
36
36
  "clsx": "^2.0.0",
37
37
  "prop-types": "^15.8.1",
38
38
  "rxjs": "~7.8.1"
@@ -1,6 +1,7 @@
1
1
  import clsx from 'clsx';
2
2
  import { MenuToggle, ToggleMenuButtonProps } from '../Menu';
3
3
  import { ComponentType, forwardRef, PropsWithChildren } from 'react';
4
+ import { useI18n } from '@stream-io/video-react-bindings';
4
5
  import { Placement } from '@floating-ui/react';
5
6
 
6
7
  import { IconButton } from './IconButton';
@@ -39,12 +40,16 @@ export const CompositeButton = forwardRef<
39
40
  });
40
41
 
41
42
  const ToggleMenuButton = forwardRef<HTMLButtonElement, ToggleMenuButtonProps>(
42
- ({ menuShown }, ref) => (
43
- <IconButton
44
- className={'str-video__menu-toggle-button'}
45
- icon={menuShown ? 'caret-down' : 'caret-up'}
46
- title="Toggle device menu"
47
- ref={ref}
48
- />
49
- ),
43
+ ({ menuShown }, ref) => {
44
+ const { t } = useI18n();
45
+
46
+ return (
47
+ <IconButton
48
+ className={'str-video__menu-toggle-button'}
49
+ icon={menuShown ? 'caret-down' : 'caret-up'}
50
+ title={t('Toggle device menu')}
51
+ ref={ref}
52
+ />
53
+ );
54
+ },
50
55
  );
@@ -1,4 +1,5 @@
1
1
  import { forwardRef } from 'react';
2
+ import { useI18n } from '@stream-io/video-react-bindings';
2
3
  import { MenuToggle, ToggleMenuButtonProps } from '../Menu';
3
4
  import {
4
5
  DeviceSelectorAudioInput,
@@ -25,15 +26,19 @@ const Menu = () => (
25
26
  );
26
27
 
27
28
  const ToggleMenuButton = forwardRef<HTMLButtonElement, ToggleMenuButtonProps>(
28
- ({ menuShown }, ref) => (
29
- <IconButton
30
- className={clsx('str-video__device-settings__button', {
31
- 'str-video__device-settings__button--active': menuShown,
32
- })}
33
- title="Toggle device menu"
34
- icon="device-settings"
35
- ref={ref}
36
- // tabindex={0}
37
- />
38
- ),
29
+ ({ menuShown }, ref) => {
30
+ const { t } = useI18n();
31
+
32
+ return (
33
+ <IconButton
34
+ className={clsx('str-video__device-settings__button', {
35
+ 'str-video__device-settings__button--active': menuShown,
36
+ })}
37
+ title={t('Toggle device menu')}
38
+ icon="device-settings"
39
+ ref={ref}
40
+ // tabindex={0}
41
+ />
42
+ );
43
+ },
39
44
  );
@@ -36,6 +36,7 @@
36
36
  "You": "You",
37
37
  "Me": "Me",
38
38
  "Unknown": "Unknown",
39
+ "Toggle device menu": "Toggle device menu",
39
40
 
40
41
  "Allow": "Allow",
41
42
  "Revoke": "Revoke",