Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: [M3-9031] - Replace one-off hardcoded color values with color tokens pt5 #11488

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tech Stories
---

Replace one-off hardcoded color values with color tokens pt5 ([#11488](https://github.com/linode/manager/pull/11488))
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export const DropdownIndicator = () => {
return <StyledKeyboardArrowDown />;
};

const StyledKeyboardArrowDown = styled(KeyboardArrowDown)(() => ({
color: '#aaa !important',
const StyledKeyboardArrowDown = styled(KeyboardArrowDown)(({ theme }) => ({
color: `${theme.tokens.color.Neutrals[50]} !important`,
height: 28,
marginRight: '4px',
marginTop: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export const StyledActionsContainer = styled('div', {
export const useStyles = makeStyles()((theme: Theme) => ({
barColorPrimary: {
backgroundColor:
theme.name === 'light' ? theme.tokens.color.Brand[30] : '#243142',
theme.name === 'light'
? theme.tokens.color.Brand[30]
: theme.tokens.color.Brand[100],
},
error: {
'& g': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const ImageUploader = React.memo((props: Props) => {
});

const Dropzone = styled('div')<{ active: boolean }>(({ active, theme }) => ({
borderColor: 'gray',
borderColor: theme.tokens.color.Neutrals[60],
borderStyle: 'dashed',
borderWidth: 1,
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export const StyledNodePoolSummaryBox = styled(Box, {

export const StyledIconButton = styled(IconButton, {
label: 'StyledIconButton',
})(() => ({
})(({ theme }) => ({
'&:hover': {
color: '#6e6e6e',
color: theme.tokens.color.Neutrals[70],
},
alignItems: 'flex-start',
color: '#979797',
color: theme.tokens.color.Neutrals[60],
marginTop: -4,
padding: 0,
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const LinodeSummary = (props: Props) => {
{
data: metrics,
format: formatPercentage,
legendColor: 'blue',
legendColor: theme.graphs.blue,
legendTitle: 'CPU %',
},
]}
Expand Down Expand Up @@ -170,13 +170,13 @@ const LinodeSummary = (props: Props) => {
{
data: getMetrics(data.io),
format: formatNumber,
legendColor: 'yellow',
legendColor: theme.graphs.yellow,
legendTitle: 'I/O Rate',
},
{
data: getMetrics(data.swap),
format: formatNumber,
legendColor: 'red',
legendColor: theme.graphs.red,
legendTitle: 'Swap Rate',
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,25 +214,25 @@ const Graph = (props: GraphProps) => {
{
data: metrics.publicIn,
format,
legendColor: 'darkGreen',
legendColor: theme.graphs.darkGreen,
legendTitle: 'Public In',
},
{
data: metrics.publicOut,
format,
legendColor: 'lightGreen',
legendColor: theme.graphs.lightGreen,
legendTitle: 'Public Out',
},
{
data: metrics.privateIn,
format,
legendColor: 'purple',
legendColor: theme.graphs.purple,
legendTitle: 'Private In',
},
{
data: metrics.privateOut,
format,
legendColor: 'yellow',
legendColor: theme.graphs.yellow,
legendTitle: 'Private Out',
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const TablesPanel = () => {
{
data: metrics,
format: formatNumber,
legendColor: 'purple',
legendColor: theme.graphs.purple,
legendTitle: 'Connections',
},
]}
Expand Down Expand Up @@ -195,13 +195,13 @@ export const TablesPanel = () => {
{
data: getMetrics(trafficIn),
format: formatBitsPerSecond,
legendColor: 'darkGreen',
legendColor: theme.graphs.darkGreen,
legendTitle: 'Traffic In',
},
{
data: getMetrics(trafficOut),
format: formatBitsPerSecond,
legendColor: 'lightGreen',
legendColor: theme.graphs.lightGreen,
legendTitle: 'Traffic Out',
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ export const PhoneVerification = ({
}))}
slotProps={{
paper: {
sx: {
border: '1px solid #3683dc',
sx: (theme) => ({
border: `1px solid ${theme.tokens.color.Ultramarine[80]}`,
maxHeight: '285px',
overflow: 'hidden',
textWrap: 'nowrap',
width: 'fit-content',
},
}),
},
}}
textFieldProps={{
Expand Down
Loading