feat(console): add shared Button component and PanelLeft/SquarePen icons#358
Merged
feat(console): add shared Button component and PanelLeft/SquarePen icons#358
Conversation
Extracted from #323 as a foundation PR. Adds a reusable <Button> primitive with variant/size props and two new lucide-style icons exported from the icons barrel. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Covers the public contract: children, default type="button" and override, variant/size class mapping, className merging, ref forwarding, and prop forwarding (onClick, disabled, aria-label). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Follows the dropdown/sheet/sidebar convention of one folder per
component. No API changes — consumers still `import { Button } from
'.../components/button'`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adopts two patterns from Base UI's Button:
- `render` prop: swap the underlying element (e.g. render={<a href=...>})
while keeping Button's styles and prop-forwarding. Kills the need for
"link styled as a button" duplicates.
- `loading` prop: sets aria-busy + aria-disabled (not native disabled)
so the button keeps focus for keyboard and screen-reader users during
async work. onClick is guarded while loading or disabled.
Also exposes `data-disabled` / `data-loading` attributes and updates CSS
hover selectors so loading/aria-disabled states get the same dimmed
style as native disabled.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 tasks
maxnoller
pushed a commit
that referenced
this pull request
Apr 18, 2026
Extracted from #323. Depends on #358 for the shared Button and the PanelLeft/SquarePen icons consumed by the sidebar header and new view-switch control. Behavior: - Sidebar collapses to an icon-only rail on the chat page and restores to the full layout on navigation away - Collapsed nav items show title tooltips; brand mark gets a tooltip too - When collapsed on desktop, an expand trigger (aria-expanded="false") appears so keyboard users can restore the sidebar - New view-switch component provides a dedicated toggle for chat vs admin surfaces, wired into the router Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 18, 2026
furukama
approved these changes
Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<Button>withvariant(default/ghost/outline/danger) andsize(default/sm/icon) props, using CSS modulesPanelLeftandSquarePenicons and exports them fromicons/index.tsNo existing callers — this PR is pure additions. Consumers will land in follow-up PRs.
Test plan
tsc --noEmitcleannpm --workspace console run test🤖 Generated with Claude Code