Contacts: Adjust styles for checkbox (#5577)

This commit is contained in:
Alexander Zinchuk 2025-02-13 14:27:56 +01:00
parent e90bd8ba9a
commit 635545a5fd
7 changed files with 15 additions and 9 deletions

View File

@ -43,5 +43,9 @@
&__help-text { &__help-text {
font-size: 0.9375rem; font-size: 0.9375rem;
color: var(--color-text-secondary); color: var(--color-text-secondary);
&__negative {
margin-top: -1rem;
}
} }
} }

View File

@ -157,12 +157,13 @@ const NewContactModal: FC<OwnProps & StateProps> = ({
)} )}
</p> </p>
<Checkbox <Checkbox
className="dialog-checkbox"
checked={shouldSharePhoneNumber} checked={shouldSharePhoneNumber}
tabIndex={0} tabIndex={0}
onCheck={setShouldSharePhoneNumber} onCheck={setShouldSharePhoneNumber}
label={lang('lng_new_contact_share')} label={lang('lng_new_contact_share')}
/> />
<p className="NewContactModal__help-text"> <p className="NewContactModal__help-text NewContactModal__help-text__negative">
{renderText(lang('AddContact.SharedContactExceptionInfo', renderingUser?.firstName))} {renderText(lang('AddContact.SharedContactExceptionInfo', renderingUser?.firstName))}
</p> </p>
</> </>

View File

@ -54,6 +54,7 @@ const WebAppsCloseConfirmationModal: FC<OwnProps> = ({
> >
<p>{lang('AreYouSureCloseMiniApps')}</p> <p>{lang('AreYouSureCloseMiniApps')}</p>
<Checkbox <Checkbox
className="dialog-checkbox"
label={lang('DoNotAskAgain')} label={lang('DoNotAskAgain')}
checked={shouldSkipInFuture} checked={shouldSkipInFuture}
onCheck={setShouldSkipInFuture} onCheck={setShouldSkipInFuture}

View File

@ -338,18 +338,21 @@ const PollModal: FC<OwnProps> = ({
<div className="quiz-mode"> <div className="quiz-mode">
{!shouldBeAnonymous && ( {!shouldBeAnonymous && (
<Checkbox <Checkbox
className="dialog-checkbox"
label={lang('PollAnonymous')} label={lang('PollAnonymous')}
checked={isAnonymous} checked={isAnonymous}
onChange={handleIsAnonymousChange} onChange={handleIsAnonymousChange}
/> />
)} )}
<Checkbox <Checkbox
className="dialog-checkbox"
label={lang('PollMultiple')} label={lang('PollMultiple')}
checked={isMultipleAnswers} checked={isMultipleAnswers}
disabled={isQuizMode} disabled={isQuizMode}
onChange={handleMultipleAnswersChange} onChange={handleMultipleAnswersChange}
/> />
<Checkbox <Checkbox
className="dialog-checkbox"
label={lang('PollQuiz')} label={lang('PollQuiz')}
checked={isQuizMode} checked={isQuizMode}
disabled={isMultipleAnswers || isQuiz !== undefined} disabled={isMultipleAnswers || isQuiz !== undefined}

View File

@ -173,7 +173,7 @@ const ChatReportPane: FC<OwnProps & StateProps> = ({
<Icon name="close" /> <Icon name="close" />
</Button> </Button>
<ConfirmDialog <ConfirmDialog
isOpen={true} isOpen={isBlockUserModalOpen}
onClose={closeBlockUserModal} onClose={closeBlockUserModal}
title={lang('BlockUserTitle', user ? getUserFirstOrLastName(user) : getChatTitle(lang, chat!))} title={lang('BlockUserTitle', user ? getUserFirstOrLastName(user) : getChatTitle(lang, chat!))}
text={user text={user
@ -185,6 +185,7 @@ const ChatReportPane: FC<OwnProps & StateProps> = ({
> >
{user && ( {user && (
<Checkbox <Checkbox
className="dialog-checkbox"
label={lang('DeleteThisChat')} label={lang('DeleteThisChat')}
checked={shouldDeleteChat} checked={shouldDeleteChat}
onCheck={setShouldDeleteChat} onCheck={setShouldDeleteChat}
@ -192,6 +193,7 @@ const ChatReportPane: FC<OwnProps & StateProps> = ({
)} )}
{user && canReportSpam && ( {user && canReportSpam && (
<Checkbox <Checkbox
className="dialog-checkbox"
label={lang('ReportChat')} label={lang('ReportChat')}
checked={shouldReportSpam} checked={shouldReportSpam}
onCheck={setShouldReportSpam} onCheck={setShouldReportSpam}

View File

@ -1,3 +0,0 @@
.checkbox {
margin: 1rem 0;
}

View File

@ -18,8 +18,6 @@ import useOldLang from '../../../hooks/useOldLang';
import Checkbox from '../../ui/Checkbox'; import Checkbox from '../../ui/Checkbox';
import ConfirmDialog from '../../ui/ConfirmDialog'; import ConfirmDialog from '../../ui/ConfirmDialog';
import styles from './UrlAuthModal.module.scss';
export type OwnProps = { export type OwnProps = {
modal?: TabState['urlAuth']; modal?: TabState['urlAuth'];
}; };
@ -82,6 +80,7 @@ const UrlAuthModal: FC<OwnProps & StateProps> = ({
{renderText(lang('OpenUrlAlert2', currentAuth?.url), ['links'])} {renderText(lang('OpenUrlAlert2', currentAuth?.url), ['links'])}
{domain && ( {domain && (
<Checkbox <Checkbox
className="dialog-checkbox"
checked={isLoginChecked} checked={isLoginChecked}
label={( label={(
<> <>
@ -92,11 +91,11 @@ const UrlAuthModal: FC<OwnProps & StateProps> = ({
</> </>
)} )}
onCheck={handleLoginChecked} onCheck={handleLoginChecked}
className={styles.checkbox}
/> />
)} )}
{shouldRequestWriteAccess && ( {shouldRequestWriteAccess && (
<Checkbox <Checkbox
className="dialog-checkbox"
checked={isWriteAccessChecked} checked={isWriteAccessChecked}
label={( label={(
<> <>
@ -108,7 +107,6 @@ const UrlAuthModal: FC<OwnProps & StateProps> = ({
)} )}
onCheck={setWriteAccessChecked} onCheck={setWriteAccessChecked}
disabled={!isLoginChecked} disabled={!isLoginChecked}
className={styles.checkbox}
/> />
)} )}
</ConfirmDialog> </ConfirmDialog>