Skip to content

Commit 2577bbf

Browse files
committed
emotion: CliAuthPageView
1 parent 1606a7c commit 2577bbf

File tree

1 file changed

+28
-34
lines changed

1 file changed

+28
-34
lines changed
Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import Button from "@mui/material/Button";
2-
import { makeStyles } from "@mui/styles";
2+
import { useTheme } from "@emotion/react";
3+
import { type FC } from "react";
4+
import { Link as RouterLink } from "react-router-dom";
35
import { CodeExample } from "components/CodeExample/CodeExample";
46
import { SignInLayout } from "components/SignInLayout/SignInLayout";
57
import { Welcome } from "components/Welcome/Welcome";
6-
import { FC } from "react";
7-
import { Link as RouterLink } from "react-router-dom";
88
import { FullScreenLoader } from "components/Loader/FullScreenLoader";
99

1010
export interface CliAuthPageViewProps {
1111
sessionToken: string | null;
1212
}
1313

1414
export const CliAuthPageView: FC<CliAuthPageViewProps> = ({ sessionToken }) => {
15-
const styles = useStyles();
15+
const theme = useTheme();
1616

1717
if (!sessionToken) {
1818
return <FullScreenLoader />;
@@ -22,45 +22,39 @@ export const CliAuthPageView: FC<CliAuthPageViewProps> = ({ sessionToken }) => {
2222
<SignInLayout>
2323
<Welcome message="Session token" />
2424

25-
<p className={styles.text}>
25+
<p
26+
css={{
27+
fontSize: 16,
28+
color: theme.palette.text.secondary,
29+
marginBottom: theme.spacing(4),
30+
textAlign: "center",
31+
lineHeight: "160%",
32+
}}
33+
>
2634
Copy the session token below and{" "}
27-
<strong className={styles.lineBreak}>paste it in your terminal</strong>.
35+
<strong
36+
css={{
37+
whiteSpace: "nowrap",
38+
}}
39+
>
40+
paste it in your terminal
41+
</strong>
42+
.
2843
</p>
2944

3045
<CodeExample code={sessionToken} password />
3146

32-
<div className={styles.links}>
47+
<div
48+
css={{
49+
display: "flex",
50+
justifyContent: "flex-end",
51+
paddingTop: theme.spacing(1),
52+
}}
53+
>
3354
<Button component={RouterLink} size="large" to="/workspaces" fullWidth>
3455
Go to workspaces
3556
</Button>
3657
</div>
3758
</SignInLayout>
3859
);
3960
};
40-
41-
const useStyles = makeStyles((theme) => ({
42-
title: {
43-
fontSize: theme.spacing(4),
44-
fontWeight: 400,
45-
lineHeight: "140%",
46-
margin: 0,
47-
},
48-
49-
text: {
50-
fontSize: 16,
51-
color: theme.palette.text.secondary,
52-
marginBottom: theme.spacing(4),
53-
textAlign: "center",
54-
lineHeight: "160%",
55-
},
56-
57-
lineBreak: {
58-
whiteSpace: "nowrap",
59-
},
60-
61-
links: {
62-
display: "flex",
63-
justifyContent: "flex-end",
64-
paddingTop: theme.spacing(1),
65-
},
66-
}));

0 commit comments

Comments
 (0)