Skip to content

Commit 606617b

Browse files
committed
CardHeaderWithResponsibleActions: make action fill the available space
This makes it possible to add come content right next to title, and some more action to the right side.
1 parent 8ee4df2 commit 606617b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • src/app/components/CardHeaderWithResponsiveActions

src/app/components/CardHeaderWithResponsiveActions/index.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ import CardHeader, { cardHeaderClasses } from '@mui/material/CardHeader'
22
import { styled } from '@mui/material/styles'
33

44
export const CardHeaderWithResponsiveActions = styled(CardHeader)(({ theme }) => ({
5+
[`.${cardHeaderClasses.content}`]: {
6+
flex: 0,
7+
textWrap: 'nowrap',
8+
},
9+
[`.${cardHeaderClasses.action}`]: {
10+
marginLeft: theme.spacing(4),
11+
flex: 1,
12+
alignSelf: 'auto',
13+
textAlign: 'end',
14+
},
515
[theme.breakpoints.down('md')]: {
616
display: 'inline',
717
alignItems: 'flex-start',

0 commit comments

Comments
 (0)