Official
ui
The look of the app's components: buttons, list rows, cards, settings, callouts, and the blocks and tables of replies. Edit a component here and the whole app draws with it.
The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/ui@0.1.1
Permissions in 0.1.1
Files
components/badge.tsx807 B
/** @jsxRuntime classic */
/** @jsx template */
// A short label on a tinted ground: a status, a count, a kind.
import { prop, variants, type Definition, template } from "../define.ts";
export const badge: Definition = {
props: { text: "", variant: "default" },
template: (
<div paddingX="0.375rem" paddingY="0.125rem" borderRadius="sm" fontSize="xs" whiteSpace="nowrap" background="mutedForeground/12" color="mutedForeground" $when={variants({
variant: {
info: { background: "info/12", color: "info" },
success: { background: "success/12", color: "success" },
warning: { background: "warning/12", color: "warning" },
danger: { background: "danger/12", color: "danger" },
},
})}><text text={prop("text")} /></div>
),
};
No comments yet.