apps/web/components/workspace-switcher.tsx
Metadata
- Purpose: Reusable frontend UI component used by web routes.
- Domain:
applications - Language:
tsx - Bytes: 876
- Lines: 26
- Content hash (short):
dbafed80 - Source (start): apps/web/components/workspace-switcher.tsx:1
- Source (end): apps/web/components/workspace-switcher.tsx:26
Indexed Symbols
WorkspaceSwitcher(line 6, function) - Implements workspace switcher for module behavior.
Markdown Headings (if applicable)
No markdown headings detected.
Source Preview
type WorkspaceSwitcherProps = {
action: string;
workspaceId: string;
};
export function WorkspaceSwitcher({ action, workspaceId }: WorkspaceSwitcherProps) {
return (
<form action={action} method="GET" className="mt-3 flex flex-wrap items-end gap-2">
<label className="text-xs font-semibold uppercase tracking-[0.16em] text-[var(--ink-soft)]">
Workspace
<input
name="workspaceId"
defaultValue={workspaceId}
className="ml-2 w-[20rem] rounded-xl border border-[var(--stroke-subtle)] bg-white px-3 py-2 font-mono text-xs text-[var(--ink-base)]"
/>
</label>
<button
type="submit"
className="rounded-xl border border-[var(--stroke-strong)] px-3 py-2 text-xs font-semibold uppercase tracking-[0.12em] text-[var(--ink-muted)]"
>
Switch
</button>
</form>
);
}