chore: remove residual FC and FunctionComponent from components

This commit is contained in:
Bryan Lee
2022-08-12 10:56:22 +08:00
parent d3b4906da9
commit 495d9ccc0c
88 changed files with 99 additions and 123 deletions
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TDShape } from '@toeverything/components/board-types';
import { Popover, Tooltip, IconButton } from '@toeverything/components/ui';
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import { Fragment } from 'react';
import { Vec } from '@tldraw/vec';
import { TldrawApp, TLDR } from '@toeverything/components/board-state';
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TDShape } from '@toeverything/components/board-types';
import { IconButton, Tooltip } from '@toeverything/components/ui';
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TDShape } from '@toeverything/components/board-types';
import {
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TDShape } from '@toeverything/components/board-types';
import { FontSizeStyle } from '@toeverything/components/board-types';
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TDShape } from '@toeverything/components/board-types';
import {
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TDShape } from '@toeverything/components/board-types';
import { IconButton, Tooltip } from '@toeverything/components/ui';
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TDShape } from '@toeverything/components/board-types';
import { IconButton, Tooltip } from '@toeverything/components/ui';
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import { DashStyle, StrokeWidth } from '@toeverything/components/board-types';
import {
LineNoneIcon,
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import type { TldrawApp } from '@toeverything/components/board-state';
import { DashStyle, StrokeWidth } from '@toeverything/components/board-types';
import type { TDShape } from '@toeverything/components/board-types';
@@ -1,4 +1,4 @@
import type { FC, ReactNode } from 'react';
import type { ReactNode } from 'react';
export const ContextMenu = ({ children }: { children: ReactNode }) => {
return <div>{children}</div>;
@@ -1,4 +1,4 @@
import type { FC, PropsWithChildren } from 'react';
import type { PropsWithChildren } from 'react';
import { useMemo } from 'react';
import { styled, Tooltip } from '@toeverything/components/ui';
import { ShapeColorNoneIcon } from '@toeverything/components/icons';
@@ -1,4 +1,4 @@
import { FC, useState, useEffect } from 'react';
import { useState, useEffect } from 'react';
import {
ConnectorIcon,
ConectorLineIcon,
@@ -1,4 +1,4 @@
import { FC, useState, useEffect } from 'react';
import { useState, useEffect } from 'react';
import {
ShapeIcon,
RectangleIcon,
@@ -1,4 +1,3 @@
import { FC } from 'react';
import style9 from 'style9';
import {
// MuiIconButton as IconButton,
@@ -14,6 +13,10 @@ import {
SelectIcon,
TextIcon,
EraserIcon,
SelectIconProps,
EraserIconProps,
HandToolIconProps,
TextIconProps,
} from '@toeverything/components/icons';
import {
@@ -26,6 +29,7 @@ import { TldrawApp } from '@toeverything/components/board-state';
import { ShapeTools } from './ShapeTools';
import { PenTools } from './pen-tools';
import { LineTools } from './LineTools';
import { ComponentType, Component } from 'react';
const activeToolSelector = (s: TDSnapshot) => s.appState.activeTool;
const toolLockedSelector = (s: TDSnapshot) => s.appState.isToolLocked;
@@ -34,8 +38,10 @@ const tools: Array<{
type: string;
label?: string;
tooltip?: string;
icon?: FC;
component?: FC<{ app: TldrawApp }>;
icon?: ComponentType<
SelectIconProps | EraserIconProps | HandToolIconProps | TextIconProps
>;
component?: ComponentType<{ app: TldrawApp }>;
}> = [
{
type: 'select',
@@ -1,4 +1,4 @@
import type { FC, ReactNode } from 'react';
import type { ReactNode } from 'react';
import { Tooltip, styled, IconButton } from '@toeverything/components/ui';
interface PenProps {
@@ -1,4 +1,4 @@
import { FC, ReactElement, type CSSProperties } from 'react';
import { ReactElement, type CSSProperties } from 'react';
import style9 from 'style9';
import {
MuiDivider as Divider,
@@ -1,4 +1,3 @@
import { FC } from 'react';
import {
MuiIconButton as IconButton,
MuiButton as Button,
@@ -1,4 +1,3 @@
import type { FC } from 'react';
import { Utils } from '@tldraw/core';
import Vec from '@tldraw/vec';
import { TLDR } from '@toeverything/components/board-state';
@@ -1,4 +1,4 @@
import type { FC, CSSProperties } from 'react';
import type { CSSProperties } from 'react';
import type { TLBounds } from '@tldraw/core';
import { styled } from '@toeverything/components/ui';
@@ -1,4 +1,4 @@
import type { FC, CSSProperties, PointerEventHandler } from 'react';
import type { CSSProperties, PointerEventHandler } from 'react';
import { useState, useRef } from 'react';
import type { TLBounds } from '@tldraw/core';
import Vec from '@tldraw/vec';