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
emotion: AddNewLicensePageView
  • Loading branch information
aslilac committed Oct 31, 2023
commit a872acd77e45ab04b5a9d17fc0a1f0ab6b36b58b
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { useTheme } from "@emotion/react";
import Button from "@mui/material/Button";
import TextField from "@mui/material/TextField";
import { makeStyles } from "@mui/styles";
import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft";
import { type FC } from "react";
import { Link as RouterLink } from "react-router-dom";
import { Fieldset } from "components/DeploySettingsLayout/Fieldset";
import { Header } from "components/DeploySettingsLayout/Header";
import { FileUpload } from "components/FileUpload/FileUpload";
import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft";
import { displayError } from "components/GlobalSnackbar/utils";
import { Stack } from "components/Stack/Stack";
import { DividerWithText } from "pages/DeploySettingsPage/LicensesSettingsPage/DividerWithText";
import { FC } from "react";
import { Link as RouterLink } from "react-router-dom";
import { ErrorAlert } from "components/Alert/ErrorAlert";
import { DividerWithText } from "pages/DeploySettingsPage/LicensesSettingsPage/DividerWithText";

type AddNewLicenseProps = {
onSaveLicenseKey: (license: string) => void;
Expand All @@ -23,7 +23,7 @@ export const AddNewLicensePageView: FC<AddNewLicenseProps> = ({
isSavingLicense,
savingLicenseError,
}) => {
const styles = useStyles();
const theme = useTheme();

function handleFileUploaded(files: File[]) {
const fileReader = new FileReader();
Expand Down Expand Up @@ -76,7 +76,7 @@ export const AddNewLicensePageView: FC<AddNewLicenseProps> = ({
description="Select a text file that contains your license key."
/>

<Stack className={styles.main}>
<Stack css={{ paddingTop: theme.spacing(5) }}>
<DividerWithText>or</DividerWithText>

<Fieldset
Expand Down Expand Up @@ -109,9 +109,3 @@ export const AddNewLicensePageView: FC<AddNewLicenseProps> = ({
</>
);
};

const useStyles = makeStyles((theme) => ({
main: {
paddingTop: theme.spacing(5),
},
}));