mirror of
https://github.com/transloadit/uppy.git
synced 2026-08-01 22:33:57 +00:00
28 lines
704 B
TypeScript
28 lines
704 B
TypeScript
import type { I18n } from '@uppy/core/utils'
|
|
import type { ComponentChild } from '@uppy/core/utils/preact'
|
|
|
|
interface PermissionScreenProps {
|
|
hasCamera: boolean
|
|
icon: () => ComponentChild | null
|
|
i18n: I18n
|
|
}
|
|
|
|
export default function PermissionsScreen({
|
|
icon,
|
|
i18n,
|
|
hasCamera,
|
|
}: PermissionScreenProps) {
|
|
return (
|
|
<div className="uppy-Webcam-permissons">
|
|
<div className="uppy-Webcam-permissonsIcon">{icon()}</div>
|
|
<div className="uppy-Webcam-title">
|
|
{hasCamera ? i18n('allowAccessTitle') : i18n('noCameraTitle')}
|
|
</div>
|
|
<p>
|
|
{hasCamera
|
|
? i18n('allowAccessDescription')
|
|
: i18n('noCameraDescription')}
|
|
</p>
|
|
</div>
|
|
)
|
|
}
|