Files
gruperly/apps/web/src/features/pwa/IosInstallHint.tsx
Jose Selesan 69275c37b4 chore: update comments and documentation for clarity and consistency across various files
- Translated comments from Spanish to English in vite.config.ts, docker-compose.yml, attendance-risk.ts, analytics.ts, attendance.ts, attendees.ts, enums.ts, groups.ts, and onboarding.ts.
- Improved descriptions for better understanding of code functionality and purpose.
- Ensured uniformity in terminology and phrasing throughout the codebase.
2026-10-01 16:06:54 -03:00

42 lines
1.5 KiB
TypeScript

import { Share, X } from 'lucide-react'
type IosInstallHintProps = {
onDismiss: () => void
}
/**
* Safari on iOS does not expose `beforeinstallprompt`: there is no way to trigger
* the install from the web, the user has to be instructed. It only informs, with
* no action button.
*/
export function IosInstallHint({ onDismiss }: IosInstallHintProps) {
return (
<div
className="fixed inset-x-0 z-30 px-4 lg:left-auto lg:right-6 lg:w-96 lg:px-0
bottom-[calc(4.5rem+env(safe-area-inset-bottom))] lg:bottom-6"
>
<div className="flex items-start gap-3 rounded-xl border border-border bg-surface p-4 shadow-lg">
<Share className="mt-0.5 size-5 shrink-0 text-accent" strokeWidth={2} />
<div className="min-w-0 flex-1">
<p className="text-sm font-semibold text-primary">Instalá Gruperly en el iPhone</p>
<p className="mt-0.5 text-xs leading-relaxed text-foreground/70">
Tocá <span className="font-medium text-foreground">Compartir</span> y elegí{' '}
<span className="font-medium text-foreground">Agregar a pantalla de inicio</span> para
abrirla como app.
</p>
</div>
<button
type="button"
onClick={onDismiss}
aria-label="Cerrar aviso de instalación"
className="shrink-0 rounded-lg p-1 text-foreground/40 transition-colors hover:bg-primary-soft hover:text-foreground"
>
<X className="size-4" />
</button>
</div>
</div>
)
}