refactor: adopt shared Button component in 18 modal components

Replace raw <button> elements with <Button> from ui/Button.tsx:
- Primary buttons (bg-gradient-brand) → <Button variant="primary">
- Secondary buttons (border-border) → <Button variant="secondary">
- Ghost buttons → <Button variant="ghost">
- Loading states use loading prop instead of manual Loader2 spinner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-03-07 22:53:20 -05:00
parent 0ec3d62ace
commit b158eddbcb
18 changed files with 155 additions and 231 deletions

View File

@@ -4,6 +4,7 @@ import { cn } from '@/lib/utils'
import { MarkdownContent } from '@/components/ui/MarkdownContent'
import { stepsApi } from '@/api/steps'
import type { Step, Review } from '@/types/step'
import { Button } from '@/components/ui/Button'
interface StepDetailModalProps {
stepId: string
@@ -318,22 +319,20 @@ export function StepDetailModal({ stepId, onClose, onInsert }: StepDetailModalPr
{/* Footer - Actions */}
<div className="flex gap-2 border-t border-border p-4">
<button
<Button
variant="secondary"
onClick={onClose}
className="flex-1 rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-accent hover:text-foreground"
className="flex-1"
>
Cancel
</button>
<button
</Button>
<Button
onClick={handleInsert}
disabled={!step}
className={cn(
'flex-1 rounded-md bg-gradient-brand px-4 py-2 text-sm font-medium text-white shadow-lg shadow-primary/20',
'hover:opacity-90 disabled:opacity-50'
)}
className="flex-1"
>
Insert Into Session
</button>
</Button>
</div>
</div>
</div>