Skip to content

Commit 82cde05

Browse files
committed
fix: remove ternaries in css
1 parent d7df6b4 commit 82cde05

File tree

2 files changed

+30
-22
lines changed

2 files changed

+30
-22
lines changed

site/src/components/EmptyState/EmptyState.tsx

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,23 @@ export const EmptyState: FC<EmptyStateProps> = ({
2525
}) => {
2626
return (
2727
<div
28-
css={{
29-
overflow: "hidden",
30-
display: "flex",
31-
flexDirection: "column",
32-
justifyContent: "center",
33-
alignItems: "center",
34-
textAlign: "center",
35-
minHeight: isCompact ? 180 : 360,
36-
padding: isCompact ? "10px 40px" : "80px 40px",
37-
position: "relative",
38-
}}
28+
css={[
29+
{
30+
overflow: "hidden",
31+
display: "flex",
32+
flexDirection: "column",
33+
justifyContent: "center",
34+
alignItems: "center",
35+
textAlign: "center",
36+
minHeight: 360,
37+
padding: "80px 40px",
38+
position: "relative",
39+
},
40+
isCompact && {
41+
minHeight: 180,
42+
padding: "10px 40px",
43+
},
44+
]}
3945
{...attrs}
4046
>
4147
<h5 css={{ fontSize: 24, fontWeight: 500, margin: 0 }}>{message}</h5>

site/src/components/StatusIndicator/StatusIndicator.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,19 @@ export const StatusIndicator: FC<StatusIndicatorProps> = ({
1515

1616
return (
1717
<div
18-
css={{
19-
height: 8,
20-
width: 8,
21-
borderRadius: 4,
22-
backgroundColor:
23-
variant === "solid" ? theme.roles[color].fill.solid : undefined,
24-
border:
25-
variant === "outlined"
26-
? `1px solid ${theme.roles[color].outline}`
27-
: undefined,
28-
}}
18+
css={[
19+
{
20+
height: 8,
21+
width: 8,
22+
borderRadius: 4,
23+
},
24+
variant === "solid" && {
25+
backgroundColor: theme.roles[color].fill.solid,
26+
},
27+
variant === "outlined" && {
28+
border: `1px solid ${theme.roles[color].outline}`,
29+
},
30+
]}
2931
/>
3032
);
3133
};

0 commit comments

Comments
 (0)