mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix drawer.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
32d32c0507
commit
4555c4c12e
@ -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<React.ReactNode>;
|
||||
}
|
||||
|
||||
const defaultProps = {
|
||||
@ -239,7 +240,7 @@ class NonInjectedDrawer extends React.Component<DrawerProps & Dependencies & typ
|
||||
}
|
||||
}
|
||||
|
||||
export const Drawer = withInjectables<Dependencies, DrawerProps>(NonInjectedDrawer as never, {
|
||||
export const Drawer = withInjectables<Dependencies, DrawerProps>(NonInjectedDrawer as React.ElementType<DrawerProps & Dependencies>, {
|
||||
getProps: (di, props) => ({
|
||||
...props,
|
||||
history: di.inject(historyInjectable),
|
||||
|
||||
@ -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<React.ReactNode>;
|
||||
}
|
||||
|
||||
export class SubTitle extends React.Component<SubTitleProps> {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user