-
-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: constraint context field legal values improvement (#6729)
Improves how we show context field legal values in the new strategy configuration. Refactored makeStyles to styled components Closes # [1-2235](https://linear.app/unleash/issue/1-2235/context-field-ui-in-strategy-configuration) Before: ![Screenshot 2024-03-28 at 12 19 12](https://github.com/Unleash/unleash/assets/104830839/43c62cf4-f344-476f-9ef6-75e388fab000) After: ![Screenshot 2024-03-28 at 13 03 46](https://github.com/Unleash/unleash/assets/104830839/16dd03e0-bc67-402b-ba54-56fa1af136a5) Signed-off-by: andreas-unleash <[email protected]>
- Loading branch information
1 parent
d3847fd
commit 81aff26
Showing
3 changed files
with
62 additions
and
41 deletions.
There are no files selected for viewing
35 changes: 21 additions & 14 deletions
35
...traintAccordionEdit/ConstraintAccordionEditBody/LegalValueLabel/LegalValueLabel.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
import { makeStyles } from 'tss-react/mui'; | ||
import { styled } from '@mui/material'; | ||
|
||
export const useStyles = makeStyles()((theme) => ({ | ||
container: { | ||
display: 'inline-block', | ||
wordBreak: 'break-word', | ||
}, | ||
value: { | ||
lineHeight: 1.33, | ||
fontSize: theme.fontSizes.smallBody, | ||
}, | ||
description: { | ||
lineHeight: 1.33, | ||
fontSize: theme.fontSizes.smallerBody, | ||
color: theme.palette.action.active, | ||
export const StyledContainer = styled('div')(({ theme }) => ({ | ||
display: 'inline-block', | ||
wordBreak: 'break-word', | ||
padding: theme.spacing(0.5, 1), | ||
background: theme.palette.common.white, | ||
border: `1px solid ${theme.palette.divider}`, | ||
borderRadius: theme.shape.borderRadius, | ||
|
||
'&:hover': { | ||
border: `2px solid ${theme.palette.primary.main}`, | ||
}, | ||
})); | ||
|
||
export const StyledValue = styled('div')(({ theme }) => ({ | ||
lineHeight: 1.33, | ||
fontSize: theme.fontSizes.smallBody, | ||
})); | ||
export const StyledDescription = styled('div')(({ theme }) => ({ | ||
lineHeight: 1.33, | ||
fontSize: theme.fontSizes.smallerBody, | ||
color: theme.palette.action.active, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters