Skip to content

Commit

Permalink
chore: replace flex for native flexGrow
Browse files Browse the repository at this point in the history
  • Loading branch information
Karine Brandelli Padilha committed Dec 23, 2024
1 parent eb43401 commit aa1fe83
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions src/core/data-display/typography/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,14 @@ import MuiTypography from '@mui/material/Typography'
import type { DefaultProps } from '../../types'
import type { TypographyProps } from '@mui/material/Typography'

type ITypography = {
flex?: number
}

type CustomTypographyProps = ITypography & TypographyProps & DefaultProps

const Typography = ({
children,
margin,
padding,
style = {},
variant = 'body2',
...otherProps
}: CustomTypographyProps) => (
}: TypographyProps & DefaultProps) => (
<MuiTypography
{...otherProps}
variant={variant}
Expand Down
2 changes: 1 addition & 1 deletion src/core/feedback/nothing-found/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const NothingFound = (props: IProps) => {

return show ? (
<Typography
flex={1}
variant='h5'
flexGrow={1}
align='center'
color='textSecondary'
padding='48px 0'
Expand Down
2 changes: 1 addition & 1 deletion src/core/surfaces/card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ const Card = (props: IProps) => {
{title && (
<Typography
name={name + '-title'}
flex={1}
variant='h6'
flexGrow={1}
color='primary'>
{title}
</Typography>
Expand Down
2 changes: 1 addition & 1 deletion src/core/surfaces/panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const Panel = (props: PanelProps) => {
!hideSummary && (
<Summary>
{title && (
<Typography noWrap flex={1} variant='subtitle1'>
<Typography noWrap flexGrow={1} variant='subtitle1'>
{title}
</Typography>
)}
Expand Down

0 comments on commit aa1fe83

Please sign in to comment.