StatusBadge is a component that displays a status text with an indicator in any hex color.

Example

import {StatusBadge} from "attio/client"

function Example({ isActive }: { isActive: boolean }) {
    const color = isActive ? "#00D17E" : "#FF0000"
    const label = isActive ? "Active" : "Inactive"

    return (
        <StatusBadge color={color}>{label}</StatusBadge>
    )
}

Props

color
string
required
The color of the status badge. This should be a hex color.
children
React.ReactNode
required
The text to display in the status badge as a label.