Design system / Organisms
Organism / Management and configuration
CreateEvaluationCriterionInline
CreateEvaluationCriterionInline validates and creates a library criterion, then reports the persisted result to the rubric owner.
Intent and composition
The component owns disclosure and field drafts, validates machine names and complete score guidance, and delegates creation to useCreateEvaluationCriterion. onCreated runs only when creation returns a record. Inline placement does not reduce this coordinated workflow to a molecule.
Coordinated concerns: Create disclosure, criterion fields, machine-name/score-guidance validation, image upload and create/attach feedback.
Local state holds the draft; useCreateEvaluationCriterion owns creation and onCreated reports the new library item to the parent. Inline placement does not make the full workflow a molecule.
Authorized-context integration
Requires criterion creation and image-upload operations. Use the real component inside an authorized rubric flow; the public reference does not simulate persistence or a successful library item.
Supported inputs and ownership
| Input | Responsibility |
|---|---|
| tenantSlug | Authorized criterion-library context. |
| onCreated | Reports a newly persisted library item so the parent can attach a copy. |
This is an integration summary, not a replacement for the implementation's complete prop types. A disabled control or hidden destination does not enforce permission.
Using it in a page
Integrate the section through its supported props and context requirements. Routes supply permitted data; instances bind product copy and behavior; templates arrange slots. Keep feature hooks and operations with their feature owner. Generic layouts must not load business data or enforce product policy.
Implementation
Repository path: src/components/evaluation-criteria/createEvaluationCriterionInline.tsx