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.2
Permissions in 0.1.2
Files
components/block.tsx976 B
/** @jsxRuntime classic */
/** @jsx template */
// The parts of a block: the raised container of a code block, a table or
// a diagram, its header (a label at the start, buttons at the end) and its
// body. Markdown draws its blocks with them; the kernel lays its widths,
// heights and scrolling over their look.
import { template, type Definition } from "../define.ts";
export const block: Definition = {
props: {},
template: <div display="flex" flexDirection="column" background="card" borderRadius="md" elevation="raised"><slot /></div>,
};
export const blockHeader: Definition = {
props: {},
template: <div display="flex" flexDirection="row" alignItems="center" justifyContent="between" height="density.fieldHeight" paddingLeft={8} paddingRight={4} fontSize="xs" color="mutedForeground"><slot /></div>,
};
export const blockBody: Definition = {
props: {},
template: <div background="background/55" paddingX="0.875rem" paddingY="0.75rem"><slot /></div>,
};
No comments yet.