Skip to content

Commit 8bdac49

Browse files
committed
feat: update StatusIndicator for outlined variant
1 parent 0d38779 commit 8bdac49

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

site/src/components/StatusIndicator/StatusIndicator.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ import type { ThemeRole } from "theme/roles";
44

55
interface StatusIndicatorProps {
66
color: ThemeRole;
7+
variant?: "solid" | "outlined";
78
}
89

9-
export const StatusIndicator: FC<StatusIndicatorProps> = ({ color }) => {
10+
export const StatusIndicator: FC<StatusIndicatorProps> = ({
11+
color,
12+
variant = "solid",
13+
}) => {
1014
const theme = useTheme();
1115

1216
return (
@@ -15,7 +19,12 @@ export const StatusIndicator: FC<StatusIndicatorProps> = ({ color }) => {
1519
height: 8,
1620
width: 8,
1721
borderRadius: 4,
18-
backgroundColor: theme.roles[color].fill.solid,
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,
1928
}}
2029
/>
2130
);

0 commit comments

Comments
 (0)