diff --git a/src/components/AttachmentsPage/AttachmentList.tsx b/src/components/AttachmentsPage/AttachmentList.tsx index e2c3c2355..ea2cf0e20 100644 --- a/src/components/AttachmentsPage/AttachmentList.tsx +++ b/src/components/AttachmentsPage/AttachmentList.tsx @@ -45,13 +45,6 @@ const AttachmentList = ({ storage }: AttachmentListProps) => { event.preventDefault() popup(event, [ - // { - // type: MenuTypes.Normal, - // label: 'Copy Image Reference', - // onClick: () => { - // // TODO Clipboard - // } - // }, { type: MenuTypes.Normal, label: 'Download', diff --git a/src/components/GlobalStyle.tsx b/src/components/GlobalStyle.tsx index 9ea29153f..58ad419b6 100644 --- a/src/components/GlobalStyle.tsx +++ b/src/components/GlobalStyle.tsx @@ -2,7 +2,7 @@ import { createGlobalStyle } from 'styled-components' import { backgroundColor, textColor } from '../lib/styled/styleFunctions' import { BaseTheme } from '../lib/styled/BaseTheme' -export default createGlobalStyle` +export default createGlobalStyle<{ theme: BaseTheme }>` body { margin: 0; ${backgroundColor} diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index fadd062e9..54f5ca6d4 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -60,7 +60,7 @@ export default () => { useGlobalKeyDownHandler(keydownHandler) const backgroundClickHandler = useMemo(() => { - return (event: MouseEvent) => { + return (event: React.MouseEvent) => { event.preventDefault() closeHandler() } diff --git a/src/components/Tutorials/TutorialsNavigator.tsx b/src/components/Tutorials/TutorialsNavigator.tsx index c9ae69610..52d810352 100644 --- a/src/components/Tutorials/TutorialsNavigator.tsx +++ b/src/components/Tutorials/TutorialsNavigator.tsx @@ -1,6 +1,6 @@ import React, { useMemo, useCallback } from 'react' import { tutorialsTree, TutorialsNavigatorTreeItem } from '../../lib/tutorials' -import SideNavigatorItem from '../SideNavigator/SideNavigatorItem' +import SideNavigatorItem from '../molecules/SideNavigatorItem' import { useRouter, useCurrentTutorialPathname } from '../../lib/router' import { useGeneralStatus } from '../../lib/generalStatus' import { useContextMenu, MenuTypes } from '../../lib/contextMenu' diff --git a/src/components/atoms/ButtonIcon.tsx b/src/components/atoms/ButtonIcon.tsx index 74dfc2f1b..2474cac67 100644 --- a/src/components/atoms/ButtonIcon.tsx +++ b/src/components/atoms/ButtonIcon.tsx @@ -1,7 +1,7 @@ import React from 'react' import styled from '../../lib/styled' -const StyledButtonIcon = styled.button<{ active: boolean }>` +const StyledButtonIcon = styled.button` color: currentColor; background-color: transparent; border: none; diff --git a/typings/styled-components.d.ts b/typings/styled-components.d.ts index 53490c5d7..a5960c8b9 100644 --- a/typings/styled-components.d.ts +++ b/typings/styled-components.d.ts @@ -1,12 +1,9 @@ declare module 'styled-components' { export type StyledComponent = any - export function createGlobalStyle( + export function createGlobalStyle

( strings: TemplateStringsArray, ...keys: Array< - | number - | undefined - | string - | ((props: { theme: T }) => string | number | undefined) + number | undefined | string | ((props: P) => string | number | undefined) > ): any export type ThemedBaseStyledInterface = {