feat: add info button variant and reuse it in mobile sessions sheet
Adds a new info-styled button variant for consistent secondary actions. Updates mobile sessions sheet actions to use the shared Button component. Cleans up the mobile footer buttons with the shared sizing and styling system.
This commit is contained in:
@@ -1800,26 +1800,28 @@ export const MobileSessionsSheet: React.FC<MobileSessionsSheetProps> = ({ open,
|
||||
style={{ paddingBottom: 'calc(0.375rem + var(--oc-safe-area-bottom, 0px))' }}
|
||||
>
|
||||
{footer.instanceLabel && footer.onOpenInstances ? (
|
||||
<button
|
||||
<Button
|
||||
type="button"
|
||||
className="flex h-10 min-w-0 flex-1 items-center gap-2 rounded-xl px-2 text-left transition-colors hover:bg-interactive-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"
|
||||
variant="info"
|
||||
size="lg"
|
||||
className="min-w-0 shrink justify-start"
|
||||
onClick={footer.onOpenInstances}
|
||||
aria-label={t('mobile.menu.instances')}
|
||||
style={{ touchAction: 'manipulation' }}
|
||||
>
|
||||
<Icon name="server" className="size-[18px] shrink-0 text-muted-foreground" />
|
||||
<span className="block min-w-0 truncate typography-ui-label text-foreground">
|
||||
{footer.instanceLabel}
|
||||
</span>
|
||||
</button>
|
||||
<Icon name="server" className="size-[18px]" />
|
||||
<span className="block min-w-0 truncate">{footer.instanceLabel}</span>
|
||||
</Button>
|
||||
) : (
|
||||
<div className="min-w-0 flex-1" />
|
||||
)}
|
||||
<div className="flex shrink-0 items-center gap-1">
|
||||
{footer.onOpenUpdate ? (
|
||||
<button
|
||||
<Button
|
||||
type="button"
|
||||
className="relative flex size-10 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-interactive-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary"
|
||||
variant="default"
|
||||
size="lg"
|
||||
className="w-10 px-0"
|
||||
onClick={footer.onOpenUpdate}
|
||||
aria-label={t('mobile.menu.update')}
|
||||
title={t('mobile.menu.update')}
|
||||
@@ -1827,18 +1829,20 @@ export const MobileSessionsSheet: React.FC<MobileSessionsSheetProps> = ({ open,
|
||||
>
|
||||
<Icon name="download" className="size-5" />
|
||||
<span className="absolute right-2 top-2 inline-flex size-2 rounded-full bg-primary" aria-hidden />
|
||||
</button>
|
||||
</Button>
|
||||
) : null}
|
||||
<button
|
||||
<Button
|
||||
type="button"
|
||||
className="flex size-10 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-interactive-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary"
|
||||
variant="default"
|
||||
size="lg"
|
||||
className="w-10 px-0"
|
||||
onClick={footer.onOpenSettings}
|
||||
aria-label={t('mobile.menu.settings')}
|
||||
title={t('mobile.menu.settings')}
|
||||
style={{ touchAction: 'manipulation' }}
|
||||
>
|
||||
<Icon name="settings-3" className="size-5" />
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user