Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions apps/extension/entrypoints/sidepanel/agents-mode-switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ import type { JSX } from 'react';
import type { SidePanelMode } from '@/src/shared/side-panel-mode';

const tabBaseClassName =
'relative h-9 shrink-0 rounded-md px-3 type-label transition outline-none focus-visible:ring-2 focus-visible:ring-brand-primary-ring ring-offset-2 ring-offset-surface-background';
'relative flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-md px-3 type-label transition outline-none focus-visible:ring-2 focus-visible:ring-brand-primary-ring ring-offset-2 ring-offset-surface-background';

const tabActiveClassName = `${tabBaseClassName} bg-surface-selected text-foreground font-medium`;
const tabInactiveClassName = `${tabBaseClassName} text-foreground-muted hover:bg-surface-hover`;

// Same pill vocabulary as the session status badges, in the brand tint.
const betaBadgeClassName =
'rounded-full bg-brand-primary/15 px-1.5 py-0.5 type-eyebrow uppercase tracking-wide text-brand-primary';

export const AgentsModeSwitch = ({
mode,
onModeChange,
Expand All @@ -32,7 +36,7 @@ export const AgentsModeSwitch = ({
Browser
</button>
<button
aria-label="Agents"
aria-label="Agents beta"
aria-selected={mode === 'agents'}
className={mode === 'agents' ? tabActiveClassName : tabInactiveClassName}
onClick={() => {
Expand All @@ -42,6 +46,9 @@ export const AgentsModeSwitch = ({
type="button"
>
Agents
<span aria-hidden="true" className={betaBadgeClassName}>
Beta
</span>
</button>
</div>
);
Loading