Skip to content
Merged
Show file tree
Hide file tree
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
fix: remove ternaries in css
  • Loading branch information
jaaydenh committed Sep 5, 2024
commit 1eedda818172432eae142d11c964ce97db79af0e
28 changes: 17 additions & 11 deletions site/src/components/EmptyState/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,23 @@ export const EmptyState: FC<EmptyStateProps> = ({
}) => {
return (
<div
css={{
overflow: "hidden",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
textAlign: "center",
minHeight: isCompact ? 180 : 360,
padding: isCompact ? "10px 40px" : "80px 40px",
position: "relative",
}}
css={[
{
overflow: "hidden",
display: "flex",
flexDirection: "column",
justifyContent: "center",
alignItems: "center",
textAlign: "center",
minHeight: 360,
padding: "80px 40px",
position: "relative",
},
isCompact && {
minHeight: 180,
padding: "10px 40px",
},
]}
{...attrs}
>
<h5 css={{ fontSize: 24, fontWeight: 500, margin: 0 }}>{message}</h5>
Expand Down
24 changes: 13 additions & 11 deletions site/src/components/StatusIndicator/StatusIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ export const StatusIndicator: FC<StatusIndicatorProps> = ({

return (
<div
css={{
height: 8,
width: 8,
borderRadius: 4,
backgroundColor:
variant === "solid" ? theme.roles[color].fill.solid : undefined,
border:
variant === "outlined"
? `1px solid ${theme.roles[color].outline}`
: undefined,
}}
css={[
{
height: 8,
width: 8,
borderRadius: 4,
},
variant === "solid" && {
backgroundColor: theme.roles[color].fill.solid,
},
variant === "outlined" && {
border: `1px solid ${theme.roles[color].outline}`,
},
]}
/>
);
};