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

Loading…
Cancel
Save