refactor(striker-ui): specify OutlinedInput as FC

main
Tsu-ba-me 3 years ago
parent e9aba3e8eb
commit 0c76873e75
  1. 8
      striker-ui/components/OutlinedInput/OutlinedInput.tsx

@ -1,3 +1,4 @@
import { FC } from 'react';
import { import {
OutlinedInput as MUIOutlinedInput, OutlinedInput as MUIOutlinedInput,
outlinedInputClasses as muiOutlinedInputClasses, outlinedInputClasses as muiOutlinedInputClasses,
@ -8,8 +9,8 @@ import { GREY, TEXT, UNSELECTED } from '../../lib/consts/DEFAULT_THEME';
type OutlinedInputProps = MUIOutlinedInputProps; type OutlinedInputProps = MUIOutlinedInputProps;
const OutlinedInput = (outlinedInputProps: OutlinedInputProps): JSX.Element => { const OutlinedInput: FC<OutlinedInputProps> = (outlinedInputProps) => {
const { label, sx } = outlinedInputProps; const { label, sx, ...outlinedInputRestProps } = outlinedInputProps;
const combinedSx = { const combinedSx = {
color: GREY, color: GREY,
@ -42,7 +43,8 @@ const OutlinedInput = (outlinedInputProps: OutlinedInputProps): JSX.Element => {
<MUIOutlinedInput <MUIOutlinedInput
// eslint-disable-next-line react/jsx-props-no-spreading // eslint-disable-next-line react/jsx-props-no-spreading
{...{ {...{
...outlinedInputProps, label,
...outlinedInputRestProps,
sx: combinedSx, sx: combinedSx,
}} }}
/> />

Loading…
Cancel
Save