Files
zap.stream/src/element/state-pill.tsx
2024-02-27 17:51:31 +00:00

22 lines
539 B
TypeScript

import { HTMLProps } from "react";
import "./state-pill.css";
import classNames from "classnames";
import { StreamState } from "@/const";
import Pill from "./pill";
type StatePillProps = { state: StreamState } & HTMLProps<HTMLSpanElement>;
export function StatePill({ state, ...props }: StatePillProps) {
return (
<Pill
{...props}
className={classNames(
"uppercase font-white",
state === StreamState.Live ? "bg-primary" : "bg-layer-1",
props.className
)}>
{state}
</Pill>
);
}