feat(10-03): update DesignGuide SkillCard section with all 5 required variants

- Expand grid to lg:grid-cols-3 for 5-card layout
- Add Loading (updating) variant (5th card per UI-SPEC requirement)
- Add onRollback/onUninstall props to installed variants
- Add descriptive comments for each variant state
This commit is contained in:
Mikkel Georgsen 2026-04-01 02:40:37 +02:00 committed by Nexus Dev
parent d915f82759
commit 0df345acf7

View file

@ -1260,7 +1260,8 @@ export function DesignGuide() {
{/* ============================================================ */} {/* ============================================================ */}
<Section title="Skill Card"> <Section title="Skill Card">
<SubSection title="Variants"> <SubSection title="Variants">
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4"> <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
{/* Default (uninstalled) */}
<SkillCard <SkillCard
skill={{ skill={{
id: "anthropic/code-review", id: "anthropic/code-review",
@ -1275,6 +1276,7 @@ export function DesignGuide() {
}} }}
onInstall={() => {}} onInstall={() => {}}
/> />
{/* Installed (no update) */}
<SkillCard <SkillCard
skill={{ skill={{
id: "anthropic/planning", id: "anthropic/planning",
@ -1288,7 +1290,10 @@ export function DesignGuide() {
ratingCount: null, ratingCount: null,
}} }}
isInstalled isInstalled
onRollback={() => {}}
onUninstall={() => {}}
/> />
{/* Installed + update available */}
<SkillCard <SkillCard
skill={{ skill={{
id: "community/docs-writer", id: "community/docs-writer",
@ -1305,22 +1310,42 @@ export function DesignGuide() {
hasUpdate hasUpdate
onUpdate={() => {}} onUpdate={() => {}}
onRollback={() => {}} onRollback={() => {}}
onUninstall={() => {}}
/> />
{/* Loading (installing) */}
<SkillCard <SkillCard
skill={{ skill={{
id: "anthropic/code-review", id: "anthropic-official/bash",
name: "Code Review", name: "Bash Scripting",
description: "Automated code review with style, security, and correctness checks.", description: "Advanced bash scripting patterns for automation, file manipulation, and system administration tasks.",
sourceId: "anthropic", sourceId: "anthropic-official",
category: "engineering", category: "engineering",
activeVersionId: null, activeVersionId: null,
removedAt: null, removedAt: null,
averageRating: 4.7, averageRating: 4.2,
ratingCount: 42, ratingCount: 38,
}} }}
onInstall={() => {}} onInstall={() => {}}
isLoading isLoading
/> />
{/* Loading (updating) */}
<SkillCard
skill={{
id: "community/react-patterns",
name: "React Patterns",
description: "Common React patterns and best practices for component design.",
sourceId: "community",
category: "frontend",
activeVersionId: "anthropic-official/bash@abc123",
removedAt: null,
averageRating: null,
ratingCount: null,
}}
isInstalled
hasUpdate
onUpdate={() => {}}
isLoading
/>
</div> </div>
</SubSection> </SubSection>
</Section> </Section>