diff --git a/src/renderer/components/drawer/drawer.tsx b/src/renderer/components/drawer/drawer.tsx index 0f20d9188e..9adcb11cdb 100644 --- a/src/renderer/components/drawer/drawer.tsx +++ b/src/renderer/components/drawer/drawer.tsx @@ -8,7 +8,7 @@ import "./drawer.scss"; import React from "react"; import { clipboard } from "electron"; import { createPortal } from "react-dom"; -import type { StorageLayer } from "../../utils"; +import type { SingleOrMany, StorageLayer } from "../../utils"; import { cssNames, noop } from "../../utils"; import { Icon } from "../icon"; import type { AnimateName } from "../animate"; @@ -40,6 +40,7 @@ export interface DrawerProps { animation?: AnimateName; onClose?: () => void; toolbar?: React.ReactNode; + children?: SingleOrMany; } const defaultProps = { @@ -239,7 +240,7 @@ class NonInjectedDrawer extends React.Component(NonInjectedDrawer as never, { +export const Drawer = withInjectables(NonInjectedDrawer as React.ElementType, { getProps: (di, props) => ({ ...props, history: di.inject(historyInjectable), diff --git a/src/renderer/components/layout/sub-title.tsx b/src/renderer/components/layout/sub-title.tsx index 413f78df23..3ee50d44e9 100644 --- a/src/renderer/components/layout/sub-title.tsx +++ b/src/renderer/components/layout/sub-title.tsx @@ -5,6 +5,7 @@ import "./sub-title.scss"; import React from "react"; +import type { SingleOrMany } from "../../utils"; import { cssNames } from "../../utils"; export interface SubTitleProps { @@ -12,7 +13,7 @@ export interface SubTitleProps { title: React.ReactNode; compact?: boolean; // no bottom padding id?: string; - children?: React.ReactNode | React.ReactNode[]; + children?: SingleOrMany; } export class SubTitle extends React.Component {