chore: cleanup

This commit is contained in:
Tom Moor
2022-04-30 08:24:58 -07:00
parent 677ca10b2b
commit a736022c39
10 changed files with 22 additions and 23 deletions

View File

@@ -12,7 +12,7 @@ const Container = styled.div<Props>`
padding: ${(props) => (props.withStickyHeader ? "4px 12px" : "60px 12px")};
${breakpoint("tablet")`
padding: ${(props: any) =>
padding: ${(props: Props) =>
props.withStickyHeader ? "4px 44px 60px" : "60px 44px"};
`};
`;

View File

@@ -2,7 +2,7 @@ import * as React from "react";
import { MenuSeparator } from "reakit/Menu";
import styled from "styled-components";
export default function Separator(rest: any) {
export default function Separator(rest: React.HTMLAttributes<HTMLHRElement>) {
return (
<MenuSeparator {...rest}>
{(props) => <HorizontalRule {...props} />}

View File

@@ -19,7 +19,7 @@ type Props = RootStore & {
membership?: CollectionGroupMembership;
showFacepile?: boolean;
showAvatar?: boolean;
renderActions: (arg0: { openMembersModal: () => void }) => React.ReactNode;
renderActions: (params: { openMembersModal: () => void }) => React.ReactNode;
};
@observer

View File

@@ -1,8 +1,15 @@
import * as React from "react";
import { NavLink, Route } from "react-router-dom";
import { match, NavLink, Route } from "react-router-dom";
type Props = React.ComponentProps<typeof NavLink> & {
children?: (match: any) => React.ReactNode;
children?: (
match:
| match<{
[x: string]: string | undefined;
}>
| boolean
| null
) => React.ReactNode;
exact?: boolean;
activeStyle?: React.CSSProperties;
to: string;

View File

@@ -14,7 +14,7 @@ type Props = {
collection: Collection | null | undefined;
onSuccess?: () => void;
style?: React.CSSProperties;
ref?: (arg0: React.ElementRef<"div"> | null | undefined) => void;
ref?: (element: React.ElementRef<"div"> | null | undefined) => void;
};
@observer

View File

@@ -65,8 +65,7 @@ const Sidebar = React.forwardRef<HTMLDivElement, Props>(
const handleStopDrag = React.useCallback(() => {
setResizing(false);
if (document.activeElement) {
// @ts-expect-error ts-migrate(2339) FIXME: Property 'blur' does not exist on type 'Element'.
if (document.activeElement instanceof HTMLElement) {
document.activeElement.blur();
}