Skip to content

chore: use emotion for styling (pt. 8) #10447

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

Merged
merged 23 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
🧹
  • Loading branch information
aslilac committed Oct 31, 2023
commit aff456021da4d02a8d813db18c0f94c83b6e3b79
23 changes: 10 additions & 13 deletions site/src/pages/CreateTokenPage/CreateTokenPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC, useState } from "react";
import { type FC, useState } from "react";
import { Helmet } from "react-helmet-async";
import { pageTitle } from "utils/page";
import { FullPageHorizontalForm } from "components/FullPageForm/FullPageHorizontalForm";
Expand All @@ -12,7 +12,6 @@ import { CreateTokenForm } from "./CreateTokenForm";
import { NANO_HOUR, CreateTokenData } from "./utils";
import { ConfirmDialog } from "components/Dialogs/ConfirmDialog/ConfirmDialog";
import { CodeExample } from "components/CodeExample/CodeExample";
import { makeStyles } from "@mui/styles";
import { ErrorAlert } from "components/Alert/ErrorAlert";

const initialValues: CreateTokenData = {
Expand All @@ -21,7 +20,6 @@ const initialValues: CreateTokenData = {
};

export const CreateTokenPage: FC = () => {
const styles = useStyles();
const navigate = useNavigate();

const {
Expand Down Expand Up @@ -72,7 +70,15 @@ export const CreateTokenPage: FC = () => {
const tokenDescription = (
<>
<p>Make sure you copy the below token before proceeding:</p>
<CodeExample code={newToken?.key ?? ""} className={styles.codeExample} />
<CodeExample
code={newToken?.key ?? ""}
css={(theme) => ({
minHeight: "auto",
userSelect: "all",
width: "100%",
marginTop: theme.spacing(3),
})}
/>
</>
);

Expand Down Expand Up @@ -114,13 +120,4 @@ export const CreateTokenPage: FC = () => {
);
};

const useStyles = makeStyles((theme) => ({
codeExample: {
minHeight: "auto",
userSelect: "all",
width: "100%",
marginTop: theme.spacing(3),
},
}));

export default CreateTokenPage;