File tree 3 files changed +7
-10
lines changed
site/src/components/IconField 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1
1
import Button from "@mui/material/Button" ;
2
2
import InputAdornment from "@mui/material/InputAdornment" ;
3
3
import Popover from "@mui/material/Popover" ;
4
- import TextField from "@mui/material/TextField" ;
4
+ import TextField , { TextFieldProps } from "@mui/material/TextField" ;
5
5
import { OpenDropdown } from "components/DropdownArrows/DropdownArrows" ;
6
6
import { useRef , FC , useState } from "react" ;
7
7
import Picker from "@emoji-mart/react" ;
8
8
import { makeStyles } from "@mui/styles" ;
9
9
import { colors } from "theme/colors" ;
10
10
import { useTranslation } from "react-i18next" ;
11
11
import data from "@emoji-mart/data/sets/14/twitter.json" ;
12
- import { IconFieldProps } from "./types" ;
13
12
import { Stack } from "components/Stack/Stack" ;
14
13
14
+ type IconFieldProps = TextFieldProps & {
15
+ onPickEmoji : ( value : string ) => void ;
16
+ } ;
17
+
15
18
const IconField : FC < IconFieldProps > = ( { onPickEmoji, ...textFieldProps } ) => {
16
19
if (
17
20
typeof textFieldProps . value !== "string" &&
Original file line number Diff line number Diff line change 1
- import { lazy , FC , Suspense } from "react" ;
2
- import { IconFieldProps } from "./types" ;
1
+ import { lazy , Suspense , ComponentProps } from "react" ;
3
2
4
3
const IconField = lazy ( ( ) => import ( "./IconField" ) ) ;
5
4
6
- export const LazyIconField : FC < IconFieldProps > = ( props ) => {
5
+ export const LazyIconField = ( props : ComponentProps < typeof IconField > ) => {
7
6
return (
8
7
< Suspense fallback = { < div role = "progressbar" data-testid = "loader" /> } >
9
8
< IconField { ...props } />
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments