Let the container align the undo outcome note (#74)
Build image / build-and-push (push) Successful in 10s
Build image / build-and-push (push) Successful in 10s
Co-authored-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #74.
This commit is contained in:
@@ -116,7 +116,7 @@ function HistoryEntry({
|
|||||||
<UndoButton
|
<UndoButton
|
||||||
changeSet={changeSet}
|
changeSet={changeSet}
|
||||||
undo={undo}
|
undo={undo}
|
||||||
className="w-32 shrink-0"
|
className="w-32 shrink-0 text-right"
|
||||||
label={reverted ? 'Undo again' : 'Undo'}
|
label={reverted ? 'Undo again' : 'Undo'}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -43,8 +43,12 @@ const TONE_CLASS: Record<Exclude<UndoOutcome['tone'], 'pending'>, string> = {
|
|||||||
|
|
||||||
function OutcomeNote({ outcome }: { outcome: UndoOutcome }) {
|
function OutcomeNote({ outcome }: { outcome: UndoOutcome }) {
|
||||||
if (outcome.tone === 'pending') return null
|
if (outcome.tone === 'pending') return null
|
||||||
|
// No text alignment of its own: the container decides. The history list stacks
|
||||||
|
// this to the right of an entry, the chat panel puts it under a left-aligned
|
||||||
|
// message, and a hard-coded text-right made the chat's copy read against its
|
||||||
|
// own column.
|
||||||
return (
|
return (
|
||||||
<p role="status" className={cn('text-right text-xs', TONE_CLASS[outcome.tone])}>
|
<p role="status" className={cn('text-xs', TONE_CLASS[outcome.tone])}>
|
||||||
{outcome.message}
|
{outcome.message}
|
||||||
</p>
|
</p>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user