mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-26 13:48:33 +02:00
fix: wrap env data before truncating env name. (#9733)
Solves an issue where the new buttons would potentially obscure the entire name of the env:  Now, instead of using grid and container queries to find the right point to break, we're using flex to always wrap before needing to truncate the environment name. The name will still truncate if necessary. Why didn't we do this originally? I ... couldn't think of a way to make flex work in a 2D layout, but the `width: 100%` property seems to do the trick 😄  PS: the buttons only stack when they have to. They stay single-line for as long as possible. (just in case you were wondering). <img width="711" alt="image" src="https://github.com/user-attachments/assets/a9f85118-5b72-4618-a91b-f05c9d520663" />
This commit is contained in:
parent
8da5fe6811
commit
d5af58ce0e
@ -37,24 +37,19 @@ const StyledHeader = styled('header')(({ theme }) => ({
|
||||
color: theme.palette.text.primary,
|
||||
alignItems: 'center',
|
||||
minHeight: theme.spacing(8),
|
||||
containerType: 'inline-size',
|
||||
}));
|
||||
|
||||
const StyledHeaderTitle = styled('hgroup')(({ theme }) => ({
|
||||
display: 'grid',
|
||||
gridTemplateColumns: 'auto 1fr',
|
||||
flexDirection: 'column',
|
||||
display: 'flex',
|
||||
flexFlow: 'row wrap',
|
||||
flex: 1,
|
||||
columnGap: theme.spacing(1),
|
||||
'@container (max-width: 500px)': {
|
||||
gridTemplateColumns: '1fr',
|
||||
},
|
||||
}));
|
||||
|
||||
const StyledHeaderTitleLabel = styled('p')(({ theme }) => ({
|
||||
width: '100%',
|
||||
fontSize: theme.fontSizes.smallerBody,
|
||||
color: theme.palette.text.secondary,
|
||||
gridColumn: '1/-1',
|
||||
}));
|
||||
|
||||
const StyledTruncator = styled(Truncator)(({ theme }) => ({
|
||||
|
Loading…
Reference in New Issue
Block a user