Skip to content

Commit 0eee16e

Browse files
committed
emotion: AppearanceSettingsPageView
1 parent 2577bbf commit 0eee16e

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

site/src/pages/DeploySettingsPage/AppearanceSettingsPage/AppearanceSettingsPageView.tsx

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ import { getFormHelpers } from "utils/formUtils";
1212
import Button from "@mui/material/Button";
1313
import FormControlLabel from "@mui/material/FormControlLabel";
1414
import { BlockPicker } from "react-color";
15-
import makeStyles from "@mui/styles/makeStyles";
1615
import Switch from "@mui/material/Switch";
1716
import TextField from "@mui/material/TextField";
18-
import { UpdateAppearanceConfig } from "api/typesGenerated";
17+
import type { UpdateAppearanceConfig } from "api/typesGenerated";
1918
import { Stack } from "components/Stack/Stack";
2019
import { useFormik } from "formik";
21-
import { useTheme } from "@mui/styles";
2220
import Link from "@mui/material/Link";
2321
import { colors } from "theme/colors";
2422
import { hslToHex } from "utils/colors";
@@ -39,9 +37,6 @@ export const AppearanceSettingsPageView = ({
3937
isEntitled,
4038
onSaveAppearance,
4139
}: AppearanceSettingsPageViewProps): JSX.Element => {
42-
const styles = useStyles();
43-
const theme = useTheme();
44-
4540
const applicationNameForm = useFormik<{
4641
application_name: string;
4742
}>({
@@ -133,7 +128,17 @@ export const AppearanceSettingsPageView = ({
133128
disabled={!isEntitled}
134129
InputProps={{
135130
endAdornment: (
136-
<InputAdornment position="end" className={styles.logoAdornment}>
131+
<InputAdornment
132+
position="end"
133+
css={(theme) => ({
134+
width: theme.spacing(3),
135+
height: theme.spacing(3),
136+
137+
"& img": {
138+
maxWidth: "100%",
139+
},
140+
})}
141+
>
137142
<img
138143
alt=""
139144
src={logoForm.values.logo_url}
@@ -241,7 +246,7 @@ export const AppearanceSettingsPageView = ({
241246
}}
242247
triangle="hide"
243248
colors={["#004852", "#D65D0F", "#4CD473", "#D94A5D", "#5A00CF"]}
244-
styles={{
249+
css={(theme) => ({
245250
default: {
246251
input: {
247252
color: "white",
@@ -255,7 +260,7 @@ export const AppearanceSettingsPageView = ({
255260
backgroundColor: "black",
256261
},
257262
},
258-
}}
263+
})}
259264
/>
260265
</Stack>
261266
</Stack>
@@ -264,17 +269,3 @@ export const AppearanceSettingsPageView = ({
264269
</>
265270
);
266271
};
267-
268-
const useStyles = makeStyles((theme) => ({
269-
form: {
270-
maxWidth: "500px",
271-
},
272-
logoAdornment: {
273-
width: theme.spacing(3),
274-
height: theme.spacing(3),
275-
276-
"& img": {
277-
maxWidth: "100%",
278-
},
279-
},
280-
}));

0 commit comments

Comments
 (0)