Skip to content

Commit

Permalink
make ts happy
Browse files Browse the repository at this point in the history
  • Loading branch information
noraleonte committed Nov 22, 2023
1 parent 5881456 commit 2aa1414
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import * as React from 'react';
import clsx from 'clsx';
import Box from '@mui/material/Box';
import { useFormControl } from '@mui/material/FormControl';
import { styled, Theme } from '@mui/material/styles';
import { styled } from '@mui/material/styles';
import useForkRef from '@mui/utils/useForkRef';
import {
unstable_composeClasses as composeClasses,
Expand All @@ -13,11 +12,11 @@ import { fakeInputClasses, getFakeInputUtilityClass } from './fakeTextFieldClass
import Outline from './Outline';
import { FakeInputElement, FakeInputProps } from './FakeInput.types';

const SectionsWrapper = styled(Box, {
const SectionsWrapper = styled('div', {
name: 'MuiFakeInput',
slot: 'Root',
overridesResolver: (props, styles) => styles.root,
})(({ theme, ownerState }: { theme: Theme; ownerState: OwnerStateType }) => {
})<{ ownerState: OwnerStateType }>(({ theme, ownerState }) => {
const borderColor =
theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
return {
Expand Down Expand Up @@ -69,7 +68,7 @@ const SectionsContainer = styled('div', {
name: 'MuiFakeInput',
slot: 'Input',
overridesResolver: (props, styles) => styles.input,
})(({ theme, ownerState }) => {
})<{ ownerState: OwnerStateType }>(({ theme, ownerState }) => {
return {
fontFamily: theme.typography.fontFamily,
fontSize: 'inherit',
Expand Down Expand Up @@ -215,6 +214,7 @@ interface OwnerStateType extends FakeInputProps {
fullWidth?: boolean;
variant?: 'filled' | 'outlined' | 'standard';
size?: 'small' | 'medium';
adornedStart?: boolean;
}

const FakeInput = React.forwardRef(function FakeInput(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ export interface FakeInputProps extends FieldsTextFieldProps {
label?: string;
endAdornment?: React.ReactNode;
startAdornment?: React.ReactNode;
onBlur?: React.FocusEventHandler;
onChange?: React.FormEventHandler;
onFocus?: React.FocusEventHandler;
onKeyDown?: React.KeyboardEventHandler;
onKeyUp?: React.KeyboardEventHandler;
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export const FakeTextField = React.forwardRef(function FakeTextField(
ownerState,
fullWidth,
required,
...other,
}}
>
<InputLabel htmlFor={id} id={inputLabelId} {...InputLabelProps}>
Expand Down

0 comments on commit 2aa1414

Please sign in to comment.