Skip to content

Commit c9f1371

Browse files
committed
Remove unecessary types module from IconField
1 parent 5f9c165 commit c9f1371

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

site/src/components/IconField/IconField.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
import Button from "@mui/material/Button";
22
import InputAdornment from "@mui/material/InputAdornment";
33
import Popover from "@mui/material/Popover";
4-
import TextField from "@mui/material/TextField";
4+
import TextField, { TextFieldProps } from "@mui/material/TextField";
55
import { OpenDropdown } from "components/DropdownArrows/DropdownArrows";
66
import { useRef, FC, useState } from "react";
77
import Picker from "@emoji-mart/react";
88
import { makeStyles } from "@mui/styles";
99
import { colors } from "theme/colors";
1010
import { useTranslation } from "react-i18next";
1111
import data from "@emoji-mart/data/sets/14/twitter.json";
12-
import { IconFieldProps } from "./types";
1312
import { Stack } from "components/Stack/Stack";
1413

14+
type IconFieldProps = TextFieldProps & {
15+
onPickEmoji: (value: string) => void;
16+
};
17+
1518
const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
1619
if (
1720
typeof textFieldProps.value !== "string" &&

site/src/components/IconField/LazyIconField.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { lazy, FC, Suspense } from "react";
2-
import { IconFieldProps } from "./types";
1+
import { lazy, Suspense, ComponentProps } from "react";
32

43
const IconField = lazy(() => import("./IconField"));
54

6-
export const LazyIconField: FC<IconFieldProps> = (props) => {
5+
export const LazyIconField = (props: ComponentProps<typeof IconField>) => {
76
return (
87
<Suspense fallback={<div role="progressbar" data-testid="loader" />}>
98
<IconField {...props} />

site/src/components/IconField/types.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)