feat: glow

This commit is contained in:
TrèsAbhi committed 2026-01-17 13:50:53 -06:00
1 parent 79b4f05809
commit dda63830ec
7 files changed
+110 -46

No files matched your search

@@ -5,4 +5,13 @@
font-size: var(--font-size-minor);
font-weight: var(--weight-medium);
display: flex;
align-items: center;
gap: var(--space-2);
.svg {
width: 1em;
height: 1em;
}
}
@@ -1,7 +1,8 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
import type { Color } from "../../core/ui/color";
import "./index.css";
import { LIGHT_TEXT_COLORS } from "../Button";
import styles from "./index.module.css";
export interface BadgeProps extends ComponentProps<"div"> {
color?: Color | "accent";
@@ -15,13 +16,14 @@ export function Badge({
highContrast,
...props
}: BadgeProps) {
const lightText = LIGHT_TEXT_COLORS.has(color as Color);
return (
<div
className={classNames("badge", className)}
className={classNames(styles.badge, className)}
style={{
backgroundColor: `var(--${color}-${highContrast ? 12 : 9})`,
color: `var(--gray-${highContrast ? 1 : 12})`,
color: `var(--gray-${highContrast || lightText ? 1 : 12})`,
...style,
}}
{...props}