mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 03:10:38 +09:00
fix(ui): place run link in same row as feedback buttons, right-aligned
When a comment has both helpful/needswork feedback buttons and a run link, the run link now appears right-aligned in the same row instead of a separate section below. Comments with only a run link (no feedback buttons) still show the run link in its own bordered row. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
a13a67de54
commit
993a3262f6
2 changed files with 19 additions and 2 deletions
|
|
@ -19,12 +19,14 @@ export function OutputFeedbackButtons({
|
|||
sharingPreference = "prompt",
|
||||
termsUrl = null,
|
||||
onVote,
|
||||
rightSlot,
|
||||
}: {
|
||||
activeVote?: FeedbackVoteValue | null;
|
||||
disabled?: boolean;
|
||||
sharingPreference?: FeedbackDataSharingPreference;
|
||||
termsUrl?: string | null;
|
||||
onVote: (vote: FeedbackVoteValue, options?: { allowSharing?: boolean; reason?: string }) => Promise<void>;
|
||||
rightSlot?: React.ReactNode;
|
||||
}) {
|
||||
const [pendingVote, setPendingVote] = useState<{
|
||||
vote: FeedbackVoteValue;
|
||||
|
|
@ -130,6 +132,7 @@ export function OutputFeedbackButtons({
|
|||
<ThumbsDown className="mr-1.5 h-3.5 w-3.5" />
|
||||
Needs work
|
||||
</Button>
|
||||
{rightSlot ? <div className="ml-auto">{rightSlot}</div> : null}
|
||||
</div>
|
||||
{collectingDownvoteReason ? (
|
||||
<div className="mt-2 rounded-md border border-border/60 bg-accent/20 p-3">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue