Merge pull request #893 from vector-im/dbkr/yarn_upgrade_jan23
Yarn upgrade
This commit is contained in:
commit
e3b4a695d6
4 changed files with 2624 additions and 2957 deletions
11
src/Menu.tsx
11
src/Menu.tsx
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { Key, useRef, useState } from "react";
|
import React, { Key, ReactNode, useRef, useState } from "react";
|
||||||
import { AriaMenuOptions, useMenu, useMenuItem } from "@react-aria/menu";
|
import { AriaMenuOptions, useMenu, useMenuItem } from "@react-aria/menu";
|
||||||
import { TreeState, useTreeState } from "@react-stately/tree";
|
import { TreeState, useTreeState } from "@react-stately/tree";
|
||||||
import { mergeProps } from "@react-aria/utils";
|
import { mergeProps } from "@react-aria/utils";
|
||||||
|
@ -25,10 +25,11 @@ import { Node } from "@react-types/shared";
|
||||||
import styles from "./Menu.module.css";
|
import styles from "./Menu.module.css";
|
||||||
|
|
||||||
interface MenuProps<T> extends AriaMenuOptions<T> {
|
interface MenuProps<T> extends AriaMenuOptions<T> {
|
||||||
className?: String;
|
className?: string;
|
||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
onAction: (value: Key) => void;
|
onAction: (value: Key) => void;
|
||||||
label?: string;
|
label?: string;
|
||||||
|
children: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Menu<T extends object>({
|
export function Menu<T extends object>({
|
||||||
|
@ -38,7 +39,11 @@ export function Menu<T extends object>({
|
||||||
label,
|
label,
|
||||||
...rest
|
...rest
|
||||||
}: MenuProps<T>) {
|
}: MenuProps<T>) {
|
||||||
const state = useTreeState<T>({ ...rest, selectionMode: "none" });
|
const state = useTreeState<T>({
|
||||||
|
...rest,
|
||||||
|
selectionMode: "none",
|
||||||
|
children: undefined,
|
||||||
|
});
|
||||||
const menuRef = useRef();
|
const menuRef = useRef();
|
||||||
const { menuProps } = useMenu<T>(rest, state, menuRef);
|
const { menuProps } = useMenu<T>(rest, state, menuRef);
|
||||||
|
|
||||||
|
|
|
@ -32,13 +32,13 @@ import { useDialog } from "@react-aria/dialog";
|
||||||
import { FocusScope } from "@react-aria/focus";
|
import { FocusScope } from "@react-aria/focus";
|
||||||
import { ButtonAria, useButton } from "@react-aria/button";
|
import { ButtonAria, useButton } from "@react-aria/button";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { AriaDialogProps } from "@react-types/dialog";
|
import { SpectrumDialogProps } from "@react-types/dialog";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { ReactComponent as CloseIcon } from "./icons/Close.svg";
|
import { ReactComponent as CloseIcon } from "./icons/Close.svg";
|
||||||
import styles from "./Modal.module.css";
|
import styles from "./Modal.module.css";
|
||||||
|
|
||||||
export interface ModalProps extends OverlayProps, AriaDialogProps {
|
export interface ModalProps extends OverlayProps, SpectrumDialogProps {
|
||||||
title: string;
|
title: string;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -30,5 +30,5 @@ export function PTTFeed({
|
||||||
}) {
|
}) {
|
||||||
const { isLocal, stream } = useCallFeed(callFeed);
|
const { isLocal, stream } = useCallFeed(callFeed);
|
||||||
const mediaRef = useMediaStream(stream, audioOutputDevice, isLocal);
|
const mediaRef = useMediaStream(stream, audioOutputDevice, isLocal);
|
||||||
return <audio ref={mediaRef} className={styles.audioFeed} playsInline />;
|
return <audio ref={mediaRef} className={styles.audioFeed} />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue