Scaffold CommiTea: yarn workspaces, Electron shell, core label schema, design system
- apps/desktop: electron-vite + React + Tailwind mapped onto design tokens (preflight off; tokens/base.css owns the reset); boots to a Reginald placeholder proving fonts/tokens/core wiring - packages/core: pure TS; gitea label schema (est/*, p/*, deadline/hard) with pessimistic conflict resolution + 15 unit tests - docs/design: full design handoff (tokens, 16 component contracts, interactive 14-screen prototype, Reginald voice rules) - docs/PLAN.md: product plan (purity rule, pm-state repo, deterministic scheduler + Monte Carlo, directive log) - Deliberate deviation from novelpad stack: no ElectricSQL/PGlite — local store is a rebuildable cache over gitea REST/webhooks (better-sqlite3 in main process, arriving in P1) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
32
docs/design/components/core/Badge.js.txt
Normal file
32
docs/design/components/core/Badge.js.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
import React from 'react';
|
||||
|
||||
const CSS = `
|
||||
.ct-badge {
|
||||
display: inline-flex; align-items: center; gap: 6px;
|
||||
font: 500 12px/1 var(--font-sans);
|
||||
padding: 4px 9px;
|
||||
border-radius: var(--radius-round);
|
||||
}
|
||||
.ct-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
|
||||
.ct-badge--ok { background: var(--ok-tint); color: var(--ok); }
|
||||
.ct-badge--warn { background: var(--warn-tint); color: var(--warn); }
|
||||
.ct-badge--danger { background: var(--danger-tint); color: var(--danger); }
|
||||
.ct-badge--info { background: var(--info-tint); color: var(--info); }
|
||||
.ct-badge--neutral { background: var(--paper-2); color: var(--ink-2); }
|
||||
.ct-badge--jade { background: var(--jade-tint); color: var(--jade-7); }
|
||||
`;
|
||||
(function inject() {
|
||||
if (typeof document !== 'undefined' && !document.getElementById('ct-badge-css')) {
|
||||
const s = document.createElement('style'); s.id = 'ct-badge-css'; s.textContent = CSS;
|
||||
document.head.appendChild(s);
|
||||
}
|
||||
})();
|
||||
|
||||
export function Badge({ tone = 'neutral', dot = false, children, style, ...rest }) {
|
||||
return (
|
||||
<span className={`ct-badge ct-badge--${tone}`} style={style} {...rest}>
|
||||
{dot ? <span className="ct-badge__dot"></span> : null}
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user