mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
feat(frontend): add mobile composer tools menu and base branch select
This commit is contained in:
1 parent
fac23b1f1a
commit
4a2e695ec2
21 files changed
+819
-158
No files matched your search
@@ -8,6 +8,14 @@ interface IconToggleButtonProps {
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
export function getIconToggleButtonClassName(active: boolean): string {
|
||||
return `p-2 rounded-lg transition-all duration-200 active:scale-95 hover:scale-105 shadow-md border disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100 disabled:hover:scale-100 ${
|
||||
active
|
||||
? 'bg-highlight hover:bg-highlight/90 text-highlight-foreground border-highlight'
|
||||
: 'bg-muted hover:bg-muted-foreground/20 text-muted-foreground hover:text-foreground border-border'
|
||||
}`
|
||||
}
|
||||
|
||||
export function IconToggleButton({ active, label, disabled = false, onClick, children }: IconToggleButtonProps) {
|
||||
return (
|
||||
<button
|
||||
@@ -17,11 +25,7 @@ export function IconToggleButton({ active, label, disabled = false, onClick, chi
|
||||
aria-pressed={active}
|
||||
aria-label={label}
|
||||
title={label}
|
||||
className={`p-2 rounded-lg transition-all duration-200 active:scale-95 hover:scale-105 shadow-md border disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100 disabled:hover:scale-100 ${
|
||||
active
|
||||
? 'bg-highlight hover:bg-highlight/90 text-highlight-foreground border-highlight'
|
||||
: 'bg-muted hover:bg-muted-foreground/20 text-muted-foreground hover:text-foreground border-border'
|
||||
}`}
|
||||
className={getIconToggleButtonClassName(active)}
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user