Dot
A small status mark, with or without a label.
import { Dot } from "@openperf/deft";
import { Preview } from "../../src/Preview";
export default function DotBasic() {
return (
<Preview>
<Dot.Root tone="fatal">Fatal</Dot.Root>
<Dot.Root tone="error">Error</Dot.Root>
<Dot.Root tone="warning">Warning</Dot.Root>
<Dot.Root tone="info">Info</Dot.Root>
<Dot.Root tone="success">Success</Dot.Root>
<Dot.Root tone="debug">Debug</Dot.Root>
<Dot.Root tone="accent">Accent</Dot.Root>
<Dot.Root aria-label="Status" />
</Preview>
);
}
- Log levels use
fatal,error,warning,infoanddebug; trace status usesinfofor OK anderrorfor failures. successmarks something connected, enabled or healthy in settings: a connected integration, an active channel, an enabled webhook.- The label takes the tone’s colour for
fatal,error,warningandaccent. Forinfoandsuccessit stays secondary, fordebugmuted. - A dot without text needs an
aria-label, such as the alert dot in the sidebar. It then getsrole="img".
API
PropType
size?"sm" | "md"
Label text size. Use `sm` in a toolbar.
Type
"sm" | "md"Default
"md"tone?"fatal" | "error" | "warning" | "info" | "success" | "debug" | "accent"
Type
"fatal" | "error" | "warning" | "info" | "success" | "debug" | "accent"Default
"info"Parts: Root. Other props go to the native span.