mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
refactor(agents): move transcript context toggle styling into shared variants
- Add an xs size variant to the shared Toggle component for compact pill-style controls. - Update the outline toggle variant so pressed state uses the muted visual treatment instead of the primary fill. - Simplify the agent transcript context toggle to use size="xs" and remove the visible context section count.
This commit is contained in:
@@ -608,17 +608,13 @@ function TurnSetupFooter({
|
||||
{showContext ? (
|
||||
<Toggle
|
||||
aria-label={`${contextOpen ? "Hide" : "Show"} prompt context`}
|
||||
className="h-5 min-h-0 min-w-0 gap-1 rounded-md px-1.5 text-xs font-medium data-[state=on]:bg-muted data-[state=on]:text-foreground"
|
||||
data-testid="transcript-prompt-context-toggle"
|
||||
onPressedChange={onContextOpenChange}
|
||||
pressed={contextOpen}
|
||||
size="sm"
|
||||
size="xs"
|
||||
variant="outline"
|
||||
>
|
||||
Context
|
||||
<span className="text-muted-foreground/70">
|
||||
{context.sections.length}
|
||||
</span>
|
||||
</Toggle>
|
||||
) : null}
|
||||
<TranscriptTimestamp timestamp={timestamp} />
|
||||
|
||||
@@ -10,10 +10,12 @@ const toggleVariants = cva(
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-transparent",
|
||||
outline: "border border-input/40 bg-background hover:bg-muted/70",
|
||||
outline:
|
||||
"border border-input/40 bg-background hover:bg-muted/70 data-[state=on]:bg-muted data-[state=on]:text-foreground",
|
||||
},
|
||||
size: {
|
||||
default: "h-9 px-3 min-w-9",
|
||||
xs: "h-5 min-h-0 min-w-0 gap-1 rounded-md px-1.5 text-xs font-medium",
|
||||
sm: "h-8 px-2 min-w-8",
|
||||
lg: "h-10 px-3 min-w-10",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user