Skip to content

Commit 12fc96c

Browse files
committed
emotion: DeploymentSettingsLayout/Fieldset
1 parent f71a979 commit 12fc96c

File tree

1 file changed

+31
-35
lines changed
  • site/src/components/DeploySettingsLayout

1 file changed

+31
-35
lines changed
Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,50 @@
11
import Button from "@mui/material/Button";
2-
import { makeStyles } from "@mui/styles";
32
import LaunchOutlined from "@mui/icons-material/LaunchOutlined";
3+
import type { FC } from "react";
4+
import { useTheme } from "@emotion/react";
45
import { Stack } from "components/Stack/Stack";
5-
import { FC } from "react";
66

77
export const Header: FC<{
88
title: string | JSX.Element;
99
description?: string | JSX.Element;
1010
secondary?: boolean;
1111
docsHref?: string;
1212
}> = ({ title, description, docsHref, secondary }) => {
13-
const styles = useStyles();
13+
const theme = useTheme();
1414

1515
return (
1616
<Stack alignItems="baseline" direction="row" justifyContent="space-between">
17-
<div className={styles.headingGroup}>
18-
<h1 className={`${styles.title} ${secondary ? "secondary" : ""}`}>
17+
<div css={{ maxWidth: 420, marginBottom: theme.spacing(3) }}>
18+
<h1
19+
css={[
20+
{
21+
fontSize: 32,
22+
fontWeight: 700,
23+
display: "flex",
24+
alignItems: "center",
25+
lineHeight: "initial",
26+
margin: 0,
27+
marginBottom: theme.spacing(0.5),
28+
gap: theme.spacing(1),
29+
},
30+
secondary && {
31+
fontSize: 24,
32+
fontWeight: 500,
33+
},
34+
]}
35+
>
1936
{title}
2037
</h1>
2138
{description && (
22-
<span className={styles.description}>{description}</span>
39+
<span
40+
css={{
41+
fontSize: 14,
42+
color: theme.palette.text.secondary,
43+
lineHeight: "160%",
44+
}}
45+
>
46+
{description}
47+
</span>
2348
)}
2449
</div>
2550

@@ -36,32 +61,3 @@ export const Header: FC<{
3661
</Stack>
3762
);
3863
};
39-
40-
const useStyles = makeStyles((theme) => ({
41-
headingGroup: {
42-
maxWidth: 420,
43-
marginBottom: theme.spacing(3),
44-
},
45-
46-
title: {
47-
fontSize: 32,
48-
fontWeight: 700,
49-
display: "flex",
50-
alignItems: "center",
51-
lineHeight: "initial",
52-
margin: 0,
53-
marginBottom: theme.spacing(0.5),
54-
gap: theme.spacing(1),
55-
56-
"&.secondary": {
57-
fontSize: 24,
58-
fontWeight: 500,
59-
},
60-
},
61-
62-
description: {
63-
fontSize: 14,
64-
color: theme.palette.text.secondary,
65-
lineHeight: "160%",
66-
},
67-
}));

0 commit comments

Comments
 (0)