Currently in {linodeViewPreference} view
diff --git a/packages/manager/src/features/Linodes/MigrateLinode/CautionNotice.tsx b/packages/manager/src/features/Linodes/MigrateLinode/CautionNotice.tsx
index 72cfc344d8e..a2aae81b5d4 100644
--- a/packages/manager/src/features/Linodes/MigrateLinode/CautionNotice.tsx
+++ b/packages/manager/src/features/Linodes/MigrateLinode/CautionNotice.tsx
@@ -1,5 +1,4 @@
-import { Theme } from '@mui/material/styles';
-import { makeStyles } from '@mui/styles';
+import { styled, useTheme } from '@mui/material/styles';
import { DateTime } from 'luxon';
import * as React from 'react';
@@ -10,36 +9,6 @@ import { Typography } from 'src/components/Typography';
import { API_MAX_PAGE_SIZE } from 'src/constants';
import { useLinodeVolumesQuery } from 'src/queries/volumes';
-const useStyles = makeStyles((theme: Theme) => ({
- checkbox: {
- marginLeft: theme.spacing(2),
- },
- header: {
- marginLeft: theme.spacing(2),
- marginTop: theme.spacing(2),
- },
- root: {
- '& ul:first-of-type': {
- '& li': {
- fontSize: '0.875rem',
- marginBottom: theme.spacing(),
- },
- fontFamily: theme.font.normal,
- },
- backgroundColor: theme.bg.bgPaper,
- borderLeft: `5px solid ${theme.palette.warning.dark}`,
- marginBottom: theme.spacing(2),
- marginTop: 24,
- padding: '4px 16px',
- },
- volumes: {
- '& li': {
- fontFamily: theme.font.bold,
- },
- marginTop: theme.spacing(),
- },
-}));
-
interface Props {
error?: string;
hasConfirmed: boolean;
@@ -50,7 +19,7 @@ interface Props {
}
const CautionNotice = (props: Props) => {
- const classes = useStyles();
+ const theme = useTheme();
// This is not great, but lets us get all of the volumes for a Linode while keeping
// the React Query store in a paginated shape. We want to keep data in a paginated shape
@@ -68,8 +37,13 @@ const CautionNotice = (props: Props) => {
const amountOfAttachedVolumes = volumesData?.results ?? 0;
return (
-
-
+
+
Caution:
@@ -104,11 +78,11 @@ const CautionNotice = (props: Props) => {
The following
{amountOfAttachedVolumes > 1 ? ' volumes' : ' volume'} will be
detached from this Linode:
-
+
{volumesData?.data.map((eachVolume) => {
return {eachVolume.label} ;
})}
-
+
)}
@@ -125,12 +99,40 @@ const CautionNotice = (props: Props) => {
{props.error && }
props.setConfirmed(!props.hasConfirmed)}
text="Accept"
+ sx={{
+ marginLeft: theme.spacing(2),
+ }}
/>
-
+
);
};
+const StyledRootDiv = styled('div', { label: 'StyledRootDiv' })(
+ ({ theme }) => ({
+ '& ul:first-of-type': {
+ '& li': {
+ fontSize: '0.875rem',
+ marginBottom: theme.spacing(),
+ },
+ fontFamily: theme.font.normal,
+ },
+ backgroundColor: theme.bg.bgPaper,
+ borderLeft: `5px solid ${theme.palette.warning.dark}`,
+ marginBottom: theme.spacing(2),
+ marginTop: 24,
+ padding: `${theme.spacing(0.5)} ${theme.spacing(2)}`,
+ })
+);
+
+const StyledVolumeUl = styled('div', { label: 'StyledVolumeUl' })(
+ ({ theme }) => ({
+ '& li': {
+ fontFamily: theme.font.bold,
+ },
+ marginTop: theme.spacing(),
+ })
+);
+
export default React.memo(CautionNotice);
diff --git a/packages/manager/src/features/Linodes/MigrateLinode/ConfigureForm.tsx b/packages/manager/src/features/Linodes/MigrateLinode/ConfigureForm.tsx
index fc3ecf1b5e5..a237edbb666 100644
--- a/packages/manager/src/features/Linodes/MigrateLinode/ConfigureForm.tsx
+++ b/packages/manager/src/features/Linodes/MigrateLinode/ConfigureForm.tsx
@@ -1,5 +1,4 @@
-import { Theme } from '@mui/material/styles';
-import { makeStyles } from '@mui/styles';
+import { styled } from '@mui/material/styles';
import * as React from 'react';
import { RegionSelect } from 'src/components/EnhancedSelect/variants/RegionSelect';
@@ -10,26 +9,6 @@ import { Paper } from 'src/components/Paper';
import { useRegionsQuery } from 'src/queries/regions';
import { getRegionCountryGroup } from 'src/utilities/formatRegion';
-const useStyles = makeStyles((theme: Theme) => ({
- currentRegion: {
- alignItems: 'center',
- display: 'flex',
- flexDirection: 'row',
- gap: theme.spacing(),
- marginBottom: theme.spacing(4),
- },
- root: {
- '& > p:first-of-type': {
- color: theme.color.label,
- fontFamily: theme.font.bold,
- marginBottom: theme.spacing(),
- marginTop: theme.spacing(2),
- },
- marginTop: theme.spacing(4),
- padding: 0,
- },
-}));
-
interface Props {
currentRegion: string;
errorText?: string;
@@ -39,7 +18,6 @@ interface Props {
}
const ConfigureForm = (props: Props) => {
- const classes = useStyles();
const { currentRegion } = props;
const { data: regions } = useRegionsQuery();
@@ -51,15 +29,15 @@ const ConfigureForm = (props: Props) => {
'us';
return (
-
+
Configure Migration
Current Region
-
+
} />
{`${getRegionCountryGroup(currentActualRegion)}: ${
currentActualRegion?.label ?? currentRegion
}`}
-
+
{
menuPlacement="top"
selectedID={props.selectedRegion}
/>
-
+
);
};
+const StyledPaper = styled(Paper, { label: 'StyledPaper' })(({ theme }) => ({
+ '& > p:first-of-type': {
+ color: theme.color.label,
+ fontFamily: theme.font.bold,
+ marginBottom: theme.spacing(),
+ marginTop: theme.spacing(2),
+ },
+ marginTop: theme.spacing(4),
+ padding: 0,
+}));
+
+const StyledDiv = styled('div', { label: 'StyledDiv' })(({ theme }) => ({
+ alignItems: 'center',
+ display: 'flex',
+ flexDirection: 'row',
+ gap: theme.spacing(),
+ marginBottom: theme.spacing(4),
+}));
+
export default React.memo(ConfigureForm);
diff --git a/packages/manager/src/features/Linodes/MigrateLinode/MigrateLinode.tsx b/packages/manager/src/features/Linodes/MigrateLinode/MigrateLinode.tsx
index 3269cc63c91..45ff4e12ab2 100644
--- a/packages/manager/src/features/Linodes/MigrateLinode/MigrateLinode.tsx
+++ b/packages/manager/src/features/Linodes/MigrateLinode/MigrateLinode.tsx
@@ -1,6 +1,5 @@
import { Event } from '@linode/api-v4/lib/account';
-import { Theme } from '@mui/material/styles';
-import { makeStyles } from '@mui/styles';
+import { styled, useTheme } from '@mui/material/styles';
import { useSnackbar } from 'notistack';
import * as React from 'react';
@@ -41,39 +40,6 @@ import { addUsedDiskSpace } from '../LinodesDetail/LinodeStorage/LinodeDisks';
import CautionNotice from './CautionNotice';
import ConfigureForm from './ConfigureForm';
-const useStyles = makeStyles((theme: Theme) => ({
- actionWrapper: {
- display: 'flex',
- justifyContent: 'flex-end',
- marginBottom: theme.spacing(2),
- marginTop: theme.spacing(2),
- },
- agreement: {
- maxWidth: '70%',
- [theme.breakpoints.down('md')]: {
- maxWidth: 'unset',
- },
- },
- button: {
- [theme.breakpoints.down('md')]: {
- marginTop: theme.spacing(2),
- },
- },
- buttonGroup: {
- marginTop: theme.spacing(3),
- [theme.breakpoints.down('md')]: {
- flexWrap: 'wrap',
- justifyContent: 'flex-end',
- },
- },
- details: {
- marginTop: theme.spacing(2),
- },
- vlanHelperText: {
- marginTop: theme.spacing(0.5),
- },
-}));
-
interface Props {
linodeId: number | undefined;
onClose: () => void;
@@ -82,7 +48,7 @@ interface Props {
export const MigrateLinode = React.memo((props: Props) => {
const { linodeId, onClose, open } = props;
- const classes = useStyles();
+ const theme = useTheme();
const { enqueueSnackbar } = useSnackbar();
const { data: linode } = useLinodeQuery(
@@ -241,7 +207,7 @@ export const MigrateLinode = React.memo((props: Props) => {
title={`Migrate Linode ${linode.label ?? ''} to another region`}
>
{error &&
}
-
+
{newLabel}
{/*
@@ -266,15 +232,20 @@ export const MigrateLinode = React.memo((props: Props) => {
/>
{showAgreement ? (
- setHasSignedAgreement(e.target.checked)}
/>
) : null}
@@ -286,9 +257,13 @@ export const MigrateLinode = React.memo((props: Props) => {
(showAgreement && !hasSignedAgreement)
}
buttonType="primary"
- className={classes.button}
loading={isLoading}
onClick={handleMigrate}
+ sx={{
+ [theme.breakpoints.down('md')]: {
+ marginTop: theme.spacing(2),
+ },
+ }}
>
Enter Migration Queue
@@ -298,6 +273,15 @@ export const MigrateLinode = React.memo((props: Props) => {
);
});
+const StyledAgreementCheckbox = styled(EUAgreementCheckbox, {
+ label: 'StyledAgreementCheckbox',
+})(({ theme }) => ({
+ maxWidth: '70%',
+ [theme.breakpoints.down('md')]: {
+ maxWidth: 'unset',
+ },
+}));
+
const getDisabledReason = (
events: Event[],
linodeStatus: string,
diff --git a/packages/manager/src/features/Linodes/PowerActionsDialogOrDrawer.tsx b/packages/manager/src/features/Linodes/PowerActionsDialogOrDrawer.tsx
index de1a876f2c6..a8037978918 100644
--- a/packages/manager/src/features/Linodes/PowerActionsDialogOrDrawer.tsx
+++ b/packages/manager/src/features/Linodes/PowerActionsDialogOrDrawer.tsx
@@ -1,6 +1,5 @@
import { Config } from '@linode/api-v4/lib/linodes';
-import { Theme } from '@mui/material/styles';
-import { makeStyles } from '@mui/styles';
+import { useTheme } from '@mui/material/styles';
import * as React from 'react';
import { ActionsPanel } from 'src/components/ActionsPanel/ActionsPanel';
@@ -20,26 +19,6 @@ import {
export type Action = 'Power Off' | 'Power On' | 'Reboot';
-const useStyles = makeStyles((theme: Theme) => ({
- dialog: {
- '& .dialog-content': {
- paddingBottom: 0,
- paddingTop: 0,
- },
- },
- notice: {
- '& .noticeText': {
- fontSize: '0.875rem !important',
- },
- },
- root: {
- alignItems: 'center',
- fontSize: '0.875rem',
- lineHeight: '1.25rem',
- marginBottom: theme.spacing(1.25),
- },
-}));
-
interface Props {
action: Action;
isOpen: boolean;
@@ -60,7 +39,7 @@ export const selectDefaultConfig = (configs?: Config[]) =>
export const PowerActionsDialog = (props: Props) => {
const { action, isOpen, linodeId, onClose } = props;
- const classes = useStyles();
+ const theme = useTheme();
const { data: linode } = useLinodeQuery(
linodeId ?? -1,
@@ -156,14 +135,26 @@ export const PowerActionsDialog = (props: Props) => {
secondaryButtonProps={{ label: 'Cancel', onClick: props.onClose }}
/>
}
- className={classes.dialog}
error={error?.[0].reason}
onClose={onClose}
open={isOpen}
+ sx={{
+ '& .dialog-content': {
+ paddingBottom: 0,
+ paddingTop: 0,
+ },
+ }}
title={`${action} Linode ${linode?.label ?? ''}?`}
>
{props.action === 'Power On' ? (
-
+
See the
guide for setting up and securing a compute instance
@@ -184,7 +175,14 @@ export const PowerActionsDialog = (props: Props) => {
)}
{props.action === 'Power Off' && (
-
+
Note:
Powered down Linodes will still accrue charges.