mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
refactor(ui): use Button loading prop instead of manual Spinner
Address PR #698 review feedback from Gemini Code Assist to use the Button component's built-in loading prop instead of manually rendering Spinner components. The Button component already handles spinner display with correct variant selection (foreground for default/destructive buttons, primary for others), so this simplifies the code and aligns with component abstractions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -86,8 +86,7 @@ export function IssueDetailPanel({
|
|||||||
{(() => {
|
{(() => {
|
||||||
if (isValidating) {
|
if (isValidating) {
|
||||||
return (
|
return (
|
||||||
<Button variant="default" size="sm" disabled>
|
<Button variant="default" size="sm" disabled loading>
|
||||||
<Spinner size="sm" variant="foreground" className="mr-1" />
|
|
||||||
Validating...
|
Validating...
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
@@ -335,15 +334,9 @@ export function IssueDetailPanel({
|
|||||||
className="w-full"
|
className="w-full"
|
||||||
onClick={loadMore}
|
onClick={loadMore}
|
||||||
disabled={loadingMore}
|
disabled={loadingMore}
|
||||||
|
loading={loadingMore}
|
||||||
>
|
>
|
||||||
{loadingMore ? (
|
{loadingMore ? 'Loading...' : 'Load More Comments'}
|
||||||
<>
|
|
||||||
<Spinner size="sm" className="mr-2" />
|
|
||||||
Loading...
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
'Load More Comments'
|
|
||||||
)}
|
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user