signal-desktop/ts/components/CallingScreenSharingController.tsx

46 lines
1.3 KiB
TypeScript
Raw Normal View History

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import { Button, ButtonVariant } from './Button';
import type { LocalizerType } from '../types/Util';
export type PropsType = {
i18n: LocalizerType;
onCloseController: () => unknown;
onStopSharing: () => unknown;
presentedSourceName: string;
};
2022-11-18 00:45:19 +00:00
export function CallingScreenSharingController({
i18n,
onCloseController,
onStopSharing,
presentedSourceName,
2022-11-18 00:45:19 +00:00
}: PropsType): JSX.Element {
return (
<div className="module-CallingScreenSharingController">
<div className="module-CallingScreenSharingController__text">
2023-03-30 00:03:25 +00:00
{i18n('icu:calling__presenting--info', {
2023-03-27 23:37:39 +00:00
window: presentedSourceName,
})}
</div>
<div className="module-CallingScreenSharingController__buttons">
<Button
className="module-CallingScreenSharingController__button"
onClick={onStopSharing}
variant={ButtonVariant.Destructive}
>
2023-03-30 00:03:25 +00:00
{i18n('icu:calling__presenting--stop')}
</Button>
<button
2023-03-30 00:03:25 +00:00
aria-label={i18n('icu:close')}
className="module-CallingScreenSharingController__close"
onClick={onCloseController}
type="button"
/>
</div>
</div>
);
2022-11-18 00:45:19 +00:00
}