skills: replace hand-rolled primary button with ActionButton; use Input primitive (P2-33, P2-34)
This commit is contained in:
1 parent
83dc1e61d7
commit
5da9945792
2 files changed
+11
-21
No files matched your search
@@ -5,7 +5,7 @@ import {
|
|||||||
Globe,
|
Globe,
|
||||||
Link,
|
Link,
|
||||||
} from "@phosphor-icons/react";
|
} from "@phosphor-icons/react";
|
||||||
import { Modal, ActionButton } from "../ui";
|
import { Modal, ActionButton, Input } from "../ui";
|
||||||
import { useAppStore } from "../../state/store";
|
import { useAppStore } from "../../state/store";
|
||||||
|
|
||||||
type TabId = "github" | "local" | "url" | "skills_sh";
|
type TabId = "github" | "local" | "url" | "skills_sh";
|
||||||
@@ -143,21 +143,13 @@ export function SkillImportModal({
|
|||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
{activeTab === "local" ? (
|
{activeTab === "local" ? (
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<input
|
<div className="flex-1">
|
||||||
className="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 w-full rounded-lg border border-border bg-card px-3.5 py-2.5 text-[14px] text-foreground placeholder:text-muted-foreground"
|
<Input value={source} onChange={setSource} placeholder={placeholder.local} />
|
||||||
value={source}
|
</div>
|
||||||
onChange={(e) => setSource(e.target.value)}
|
|
||||||
placeholder={placeholder.local}
|
|
||||||
/>
|
|
||||||
<ActionButton label="Browse" onClick={() => void handleBrowse()} />
|
<ActionButton label="Browse" onClick={() => void handleBrowse()} />
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<input
|
<Input value={source} onChange={setSource} placeholder={placeholder[activeTab]} />
|
||||||
className="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 w-full rounded-lg border border-border bg-card px-3.5 py-2.5 text-[14px] text-foreground placeholder:text-muted-foreground"
|
|
||||||
value={source}
|
|
||||||
onChange={(e) => setSource(e.target.value)}
|
|
||||||
placeholder={placeholder[activeTab]}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{activeTab === "skills_sh" && (
|
{activeTab === "skills_sh" && (
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
} from "@phosphor-icons/react";
|
} from "@phosphor-icons/react";
|
||||||
import type { AgentRecord } from "@shared/types";
|
import type { AgentRecord } from "@shared/types";
|
||||||
import { useAppStore } from "../../state/store";
|
import { useAppStore } from "../../state/store";
|
||||||
import { EmptyState } from "../ui";
|
import { ActionButton, EmptyState } from "../ui";
|
||||||
import { SkillList } from "./SkillList";
|
import { SkillList } from "./SkillList";
|
||||||
import { SkillImportModal } from "./SkillImportModal";
|
import { SkillImportModal } from "./SkillImportModal";
|
||||||
import { SkillDetail } from "./SkillDetail";
|
import { SkillDetail } from "./SkillDetail";
|
||||||
@@ -106,14 +106,12 @@ export function SkillsSection({
|
|||||||
title="No skills imported"
|
title="No skills imported"
|
||||||
detail="Import skills from GitHub, a local path, or skills.sh to get started."
|
detail="Import skills from GitHub, a local path, or skills.sh to get started."
|
||||||
action={
|
action={
|
||||||
<button
|
<ActionButton
|
||||||
type="button"
|
label="Import Skill"
|
||||||
className="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 inline-flex items-center gap-2 rounded-lg border border-transparent bg-primary px-4 py-2.5 text-[12px] font-bold text-primary-foreground shadow-[0_1px_3px_rgba(74,93,122,0.35)] transition hover:bg-primary/90"
|
icon={Plus}
|
||||||
|
tone="accent"
|
||||||
onClick={() => setSkillImportModalOpen(true)}
|
onClick={() => setSkillImportModalOpen(true)}
|
||||||
>
|
/>
|
||||||
<Plus size={14} weight="bold" />
|
|
||||||
Import Skill
|
|
||||||
</button>
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in new issue
Block a user