Skip to content

Commit 9a8d6bb

Browse files
change: [M3-9434] - Update styles to CDS for create menu (linode#11821)
* change: [M3-9434] - Theme changes to create menu * update styles to CDS * Update CreateMenu.styles.ts * Added changeset: Update styles to CSD for create menu * Update packages/manager/src/features/TopMenu/CreateMenu/CreateMenu.styles.ts Co-authored-by: Hussain Khalil <[email protected]> * Disabling the custom font-weight eslint rule. --------- Co-authored-by: Hussain Khalil <[email protected]>
1 parent 1a67939 commit 9a8d6bb

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Changed
3+
---
4+
5+
Update styles to CSD for create menu ([#11821](https://github.com/linode/manager/pull/11821))

packages/manager/.eslintrc.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ module.exports = {
241241
rules: {
242242
'@linode/cloud-manager/deprecate-formik': 'warn',
243243
'@linode/cloud-manager/no-createLinode': 'off',
244-
'@linode/cloud-manager/no-custom-fontWeight': 'error',
245244
'@typescript-eslint/consistent-type-imports': 'warn',
246245
'@typescript-eslint/explicit-function-return-type': 'off',
247246
'@typescript-eslint/explicit-module-boundary-types': 'off',

packages/manager/src/features/TopMenu/CreateMenu/CreateMenu.styles.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,46 @@ import Add from 'src/assets/icons/add.svg';
77
export const StyledHeading = styled('h3', {
88
label: 'StyledHeading',
99
shouldForwardProp: omittedProps(['paddingTop']),
10-
})<{ paddingTop?: boolean }>(({ theme, ...props }) => ({
10+
})<{ marginTop?: boolean }>(({ theme, ...props }) => ({
1111
'& svg': {
1212
height: 20,
1313
marginRight: theme.spacing(1),
1414
width: 20,
1515
},
1616
alignItems: 'center',
17-
color: theme.name === 'dark' ? theme.tokens.color.Neutrals[50] : 'inherit',
17+
color: theme.tokens.content.Text.Secondary.Default,
1818
display: 'flex',
19-
font: theme.font.bold,
20-
fontSize: '0.7rem',
19+
fontSize: theme.tokens.font.FontSize.Xxxs,
20+
fontWeight: theme.tokens.font.FontWeight.Extrabold,
2121
letterSpacing: '1px',
22+
lineHeight: theme.tokens.font.LineHeight.Xxxs,
2223
margin: 0,
2324
padding: '8px 14px',
24-
textTransform: 'uppercase',
25+
textTransform: theme.tokens.font.Textcase.Uppercase,
26+
backgroundColor: theme.tokens.background.Normal,
2527
[theme.breakpoints.up('lg')]: {
26-
background: 'inherit',
27-
padding: `${props.paddingTop ? '16px' : '8px'} 16px 6px 16px`,
28+
marginTop: `${props.marginTop ? '12px' : ''}`,
29+
padding: `8px 16px 6px 16px`,
2830
},
2931
}));
3032

3133
export const StyledMenuItem = styled(MenuItem, {
3234
label: 'StyledMenuItem',
3335
})(({ theme }) => ({
36+
backgroundColor: theme.tokens.background.Normal,
3437
padding: '8px 14px',
3538
// We have to do this because in packages/manager/src/index.css we force underline links
3639
textDecoration: 'none !important',
3740
[theme.breakpoints.up('md')]: {
38-
padding: '8px 16px',
41+
minWidth: '326px',
42+
padding: `${theme.spacing(1)} ${theme.spacing(2)}`,
3943
},
4044
})) as typeof MenuItem;
4145

4246
export const StyledPaper = styled(Paper, {
4347
label: 'StyledPaper',
4448
})(({ theme }) => ({
45-
background: theme.bg.appBar,
49+
backgroundColor: theme.tokens.background.Normal,
4650
maxHeight: 500,
4751
padding: `${theme.spacing(1)} 0`,
4852
[theme.breakpoints.down('lg')]: {
@@ -69,10 +73,10 @@ export const StyledMenuList = styled(MenuList, {
6973
export const StyledLinkTypography = styled(Typography, {
7074
label: 'StyledLinkTypography',
7175
})(({ theme }) => ({
72-
color: theme.color.offBlack,
73-
font: theme.font.bold,
74-
fontSize: '1rem',
75-
lineHeight: '1.4rem',
76+
color: theme.tokens.content.Text.Primary.Default,
77+
fontSize: theme.tokens.font.FontSize.S,
78+
fontWeight: theme.tokens.font.FontWeight.Bold,
79+
lineHeight: theme.tokens.font.LineHeight.Xs,
7680
}));
7781

7882
export const StyledAddIcon = styled(Add, {

packages/manager/src/features/TopMenu/CreateMenu/ProductFamilyGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const ProductFamilyGroup = (props: ProductFamilyGroupProps) => {
2727

2828
return (
2929
<>
30-
<StyledHeading paddingTop={productFamily.name === 'Databases'}>
30+
<StyledHeading marginTop={productFamily.name === 'Databases'}>
3131
{productFamily.icon}
3232
{productFamily.name}
3333
</StyledHeading>

0 commit comments

Comments
 (0)