Skip to content

Commit

Permalink
fix: typescript lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeDravarol committed Feb 13, 2023
1 parent 37c7f0a commit 2690b6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/components/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import React from 'react';

import PatternDivide from '@/assets/patterns/pattern-divide.svg';

const Container: React.FC<ContainerProps> = ({ children, ...rest }) => {
type Props = ContainerProps & {
component?: React.ElementType
}

const Container: React.FC<Props> = ({ children, ...rest }) => {
return (
<MuiContainer sx={{ fontSize: 0 }} {...rest}>
<PatternDivide />
Expand Down
5 changes: 2 additions & 3 deletions src/components/NumberTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';
import IconMinus from '@/assets/icons/icon-minus.svg';
import IconPlus from '@/assets/icons/icon-plus.svg';

const StyledTextField = styled(TextField)(({ theme }) => ({
const StyledTextField = styled(TextField)(() => ({
height: 43,
input: {
fontSize: '1.25rem', // 20px
Expand All @@ -18,8 +18,7 @@ const StyledTextField = styled(TextField)(({ theme }) => ({
},
}));


type Props = TextFieldProps & {
type Props = TextFieldProps & {
handlePlusClick?: React.MouseEventHandler<HTMLButtonElement>;
handleMinusClick?: React.MouseEventHandler<HTMLButtonElement>;
}
Expand Down
8 changes: 4 additions & 4 deletions src/pages/design-system.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Dropdown from '@/components/Dropdown';
import NumberTextField from '@/components/NumberTextField';
import TextField from '@/components/TextField';

const HeaderContainer = styled(Box)(({ theme }) => ({
const HeaderContainer = styled(Box)(() => ({
width: 826,
height: 200,
marginInline: 'auto',
Expand All @@ -25,7 +25,7 @@ const FixedContainer = styled(Container)(({ theme }) => ({
color: theme.palette.neutral.mirage,
}));

const ColorCircle = styled(Box)(({ theme }) => ({
const ColorCircle = styled(Box)(() => ({
height: 64,
width: 64,
borderRadius: '50%',
Expand All @@ -42,7 +42,7 @@ const TypographyGridContainer = styled(GridContainer)(({ theme }) => ({
gridGap: theme.spacing(2.625),
}));

const ButtonsGridContainer = styled(GridContainer)(({ theme }) => ({
const ButtonsGridContainer = styled(GridContainer)(() => ({
gridTemplateColumns: '1fr 778px',
gridGap: 'revert',
alignItems: 'center',
Expand All @@ -60,7 +60,7 @@ const ButtonContainer = styled(Stack)(({ theme }) => ({
alignItems: 'center',
}));

const ButtonStateTypography = styled(Typography)(({ theme }) => ({
const ButtonStateTypography = styled(Typography)(() => ({
fontSize: '0.813rem',
lineHeight: '1.438rem',
letterSpacing: 'revert',
Expand Down

0 comments on commit 2690b6e

Please sign in to comment.