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: AppearanceSettingsPageView
  • Loading branch information
aslilac committed Oct 31, 2023
commit a87148e788aca829e699ee0b129ea074c8cef140
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ import { getFormHelpers } from "utils/formUtils";
import Button from "@mui/material/Button";
import FormControlLabel from "@mui/material/FormControlLabel";
import { BlockPicker } from "react-color";
import makeStyles from "@mui/styles/makeStyles";
import Switch from "@mui/material/Switch";
import TextField from "@mui/material/TextField";
import { UpdateAppearanceConfig } from "api/typesGenerated";
import type { UpdateAppearanceConfig } from "api/typesGenerated";
import { Stack } from "components/Stack/Stack";
import { useFormik } from "formik";
import { useTheme } from "@mui/styles";
import Link from "@mui/material/Link";
import { colors } from "theme/colors";
import { hslToHex } from "utils/colors";
Expand All @@ -39,9 +37,6 @@ export const AppearanceSettingsPageView = ({
isEntitled,
onSaveAppearance,
}: AppearanceSettingsPageViewProps): JSX.Element => {
const styles = useStyles();
const theme = useTheme();

const applicationNameForm = useFormik<{
application_name: string;
}>({
Expand Down Expand Up @@ -133,7 +128,17 @@ export const AppearanceSettingsPageView = ({
disabled={!isEntitled}
InputProps={{
endAdornment: (
<InputAdornment position="end" className={styles.logoAdornment}>
<InputAdornment
position="end"
css={(theme) => ({
width: theme.spacing(3),
height: theme.spacing(3),

"& img": {
maxWidth: "100%",
},
})}
>
<img
alt=""
src={logoForm.values.logo_url}
Expand Down Expand Up @@ -241,7 +246,7 @@ export const AppearanceSettingsPageView = ({
}}
triangle="hide"
colors={["#004852", "#D65D0F", "#4CD473", "#D94A5D", "#5A00CF"]}
styles={{
css={(theme) => ({
default: {
input: {
color: "white",
Expand All @@ -255,7 +260,7 @@ export const AppearanceSettingsPageView = ({
backgroundColor: "black",
},
},
}}
})}
/>
</Stack>
</Stack>
Expand All @@ -264,17 +269,3 @@ export const AppearanceSettingsPageView = ({
</>
);
};

const useStyles = makeStyles((theme) => ({
form: {
maxWidth: "500px",
},
logoAdornment: {
width: theme.spacing(3),
height: theme.spacing(3),

"& img": {
maxWidth: "100%",
},
},
}));