Skip to content

Commit

Permalink
chore: use styled instead of sx
Browse files Browse the repository at this point in the history
  • Loading branch information
daveleek committed Nov 25, 2024
1 parent a4a5321 commit b1a809a
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import { Box, Typography } from '@mui/material';
import { Box, Typography, styled } from '@mui/material';
import Input from 'component/common/Input/Input';

const StyledBox = styled(Box)(({ theme }) => ({
paddingBottom: theme.spacing(2),
}));

const StyledTypography = styled(Typography)(({ theme }) => ({
paddingBottom: theme.spacing(2),
}));

interface IMilestoneStrategyTitleProps {
title: string;
setTitle: (title: string) => void;
Expand All @@ -11,21 +19,17 @@ export const MilestoneStrategyTitle = ({
setTitle,
}: IMilestoneStrategyTitleProps) => {
return (
<Box sx={{ paddingBottom: (theme) => theme.spacing(2) }}>
<Typography
sx={{
paddingBottom: (theme) => theme.spacing(2),
}}
>
<StyledBox>
<StyledTypography>
What would you like to call this strategy? (optional)
</Typography>
</StyledTypography>
<Input
label='Strategy title'
id='title-input'
value={title}
onChange={(e) => setTitle(e.target.value)}
sx={{ width: '100%' }}
/>
</Box>
</StyledBox>
);
};

0 comments on commit b1a809a

Please sign in to comment.