feat: adopt kumo green ui system
This commit is contained in:
@@ -97,6 +97,26 @@ export function InteractiveWidget({ initialData }: { initialData: Data }) {
|
||||
|
||||
## Semantic HTML
|
||||
|
||||
## Kumo UI Convention
|
||||
|
||||
Use `components/ui/*` as the project-owned adapter layer for Cloudflare Kumo components.
|
||||
Feature modules and route files should import `Button`, `Input`, `Select`, `Textarea`, `Table`,
|
||||
`Checkbox`, `Badge`, `Card`, and `Dialog` from `@/components/ui/...` instead of importing
|
||||
`@cloudflare/kumo` directly.
|
||||
|
||||
```typescript
|
||||
// Good: project adapter keeps Kumo API differences local
|
||||
import { Select } from "@/components/ui/select";
|
||||
import { Table } from "@/components/ui/table";
|
||||
|
||||
// Avoid: feature code should not hand-style native controls
|
||||
<select name="roleId" />
|
||||
<table />
|
||||
```
|
||||
|
||||
Visible form controls and data tables should use the Kumo-backed adapters. Native hidden
|
||||
inputs are acceptable only inside adapters when needed to preserve FormData semantics.
|
||||
|
||||
### Use Proper Elements
|
||||
|
||||
```typescript
|
||||
|
||||
Reference in New Issue
Block a user