Refactored and cleaned up Modal and friends

This commit is contained in:
Alvaro 2022-09-29 16:40:09 -06:00 committed by GitHub
parent f64426fbe0
commit 00a720faa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 853 additions and 787 deletions

View file

@ -82,6 +82,20 @@ export const CallingSelectPresentingSourcesModal = ({
source => source.isScreen
);
const footer = (
<>
<Button onClick={() => setPresenting()} variant={ButtonVariant.Secondary}>
{i18n('cancel')}
</Button>
<Button
disabled={!sourceToPresent}
onClick={() => setPresenting(sourceToPresent)}
>
{i18n('calling__SelectPresentingSourcesModal--confirm')}
</Button>
</>
);
return (
<Modal
modalName="CallingSelectPresentingSourcesModal"
@ -93,6 +107,7 @@ export const CallingSelectPresentingSourcesModal = ({
}}
theme={Theme.Dark}
title={i18n('calling__SelectPresentingSourcesModal--title')}
modalFooter={footer}
>
<div className="module-CallingSelectPresentingSourcesModal__title">
{i18n('calling__SelectPresentingSourcesModal--entireScreen')}
@ -120,20 +135,6 @@ export const CallingSelectPresentingSourcesModal = ({
/>
))}
</div>
<Modal.ButtonFooter moduleClassName="module-CallingSelectPresentingSourcesModal">
<Button
onClick={() => setPresenting()}
variant={ButtonVariant.Secondary}
>
{i18n('cancel')}
</Button>
<Button
disabled={!sourceToPresent}
onClick={() => setPresenting(sourceToPresent)}
>
{i18n('calling__SelectPresentingSourcesModal--confirm')}
</Button>
</Modal.ButtonFooter>
</Modal>
);
};