Button: Remove 'smaller' size in some components (#6169)
This commit is contained in:
parent
fd4bf1797e
commit
4c950b34d8
@ -77,7 +77,7 @@ const AuthRegister: FC<StateProps> = ({
|
||||
autoComplete="family-name"
|
||||
/>
|
||||
{isButtonShown && (
|
||||
<Button size="smaller" type="submit" ripple isLoading={authIsLoading}>{lang('Next')}</Button>
|
||||
<Button type="submit" ripple isLoading={authIsLoading}>{lang('Next')}</Button>
|
||||
)}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -109,7 +109,6 @@ const CountryPickerModal: FC<OwnProps> = ({
|
||||
|
||||
<div className={styles.footer}>
|
||||
<Button
|
||||
size="smaller"
|
||||
onClick={handleSubmit}
|
||||
>
|
||||
{lang('SelectCountries.OK')}
|
||||
|
||||
@ -112,7 +112,6 @@ const InviteLink: FC<OwnProps> = ({
|
||||
</div>
|
||||
{withShare && (
|
||||
<Button
|
||||
size="smaller"
|
||||
disabled={isDisabled}
|
||||
onClick={handleShare}
|
||||
className={styles.share}
|
||||
|
||||
@ -155,7 +155,7 @@ const PasswordForm: FC<OwnProps> = ({
|
||||
</div>
|
||||
{description && <p className="description">{description}</p>}
|
||||
{onSubmit && (canSubmit || shouldShowSubmit) && (
|
||||
<Button size="smaller" type="submit" ripple={!noRipple} isLoading={isLoading} disabled={!canSubmit}>
|
||||
<Button type="submit" ripple={!noRipple} isLoading={isLoading} disabled={!canSubmit}>
|
||||
{submitLabel}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
@ -110,7 +110,6 @@ const PrivacySettingsNoticeModal = ({ isOpen, isReadDate, user }: OwnProps & Sta
|
||||
)}
|
||||
</p>
|
||||
<Button
|
||||
size="smaller"
|
||||
onClick={isReadDate ? handleShowReadTime : handleShowLastSeen}
|
||||
className={styles.button}
|
||||
>
|
||||
@ -126,7 +125,6 @@ const PrivacySettingsNoticeModal = ({ isOpen, isReadDate, user }: OwnProps & Sta
|
||||
</p>
|
||||
<Button
|
||||
withPremiumGradient
|
||||
size="smaller"
|
||||
onClick={handleOpenPremium}
|
||||
className={styles.button}
|
||||
>
|
||||
|
||||
@ -239,7 +239,6 @@ const StickerSetModal: FC<OwnProps & StateProps> = ({
|
||||
</div>
|
||||
<div className="button-wrapper">
|
||||
<Button
|
||||
size="smaller"
|
||||
fluid
|
||||
color={isAdded ? 'danger' : 'primary'}
|
||||
onClick={handleButtonClick}
|
||||
|
||||
@ -69,7 +69,6 @@ function PaidMessagePrice({
|
||||
<Button
|
||||
color="primary"
|
||||
fluid
|
||||
size="smaller"
|
||||
noForcedUpperCase
|
||||
className="settings-unlock-button"
|
||||
onClick={handleUnlockWithPremium}
|
||||
|
||||
@ -50,7 +50,6 @@ const PickerModal = ({
|
||||
withPremiumGradient={withPremiumGradient}
|
||||
onClick={onConfirm || modalProps.onClose}
|
||||
color="primary"
|
||||
size="smaller"
|
||||
disabled={isConfirmDisabled}
|
||||
>
|
||||
{confirmButtonText || lang('Confirm')}
|
||||
|
||||
@ -405,7 +405,6 @@ const ChatExtra: FC<OwnProps & StateProps> = ({
|
||||
>
|
||||
<Button
|
||||
className={styles.openAppButton}
|
||||
size="smaller"
|
||||
onClick={handleOpenApp}
|
||||
>
|
||||
{oldLang('ProfileBotOpenApp')}
|
||||
|
||||
@ -57,7 +57,6 @@ const EmptyFolder: FC<OwnProps & StateProps> = ({
|
||||
fluid
|
||||
pill
|
||||
onClick={handleEditFolder}
|
||||
size="smaller"
|
||||
isRtl={lang.isRtl}
|
||||
>
|
||||
<Icon name="settings" />
|
||||
|
||||
@ -54,7 +54,6 @@ const EmptyForum: FC<OwnProps & StateProps> = ({
|
||||
ripple={!isMobile}
|
||||
fluid
|
||||
onClick={handleCreateTopic}
|
||||
size="smaller"
|
||||
isRtl={lang.isRtl}
|
||||
>
|
||||
<div className={styles.buttonText}>
|
||||
|
||||
@ -57,10 +57,10 @@ const UnconfirmedSession = ({ sessions, onHeightChange }: OwnProps) => {
|
||||
{lang('UnconfirmedAuthSingle', locationString)}
|
||||
</p>
|
||||
<div className={styles.buttons}>
|
||||
<Button fluid isText size="smaller" className={styles.button} onClick={handleAccept}>
|
||||
<Button fluid isText className={styles.button} onClick={handleAccept}>
|
||||
{lang('UnconfirmedAuthConfirm')}
|
||||
</Button>
|
||||
<Button fluid isText size="smaller" color="danger" onClick={handleReject} className={styles.button}>
|
||||
<Button fluid isText color="danger" onClick={handleReject} className={styles.button}>
|
||||
{lang('UnconfirmedAuthDeny')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -118,7 +118,6 @@ const PublicPostsSearchLauncher = ({
|
||||
<Button
|
||||
className={styles.paidSearchButton}
|
||||
color="primary"
|
||||
size="smaller"
|
||||
disabled={!searchQuery}
|
||||
noForcedUpperCase
|
||||
onClick={handlePaidSearchClick}
|
||||
@ -164,7 +163,6 @@ const PublicPostsSearchLauncher = ({
|
||||
<Button
|
||||
className={styles.searchButton}
|
||||
color="primary"
|
||||
size="smaller"
|
||||
noForcedUpperCase
|
||||
disabled={!searchQuery}
|
||||
onClick={handleSearchClick}
|
||||
@ -209,7 +207,6 @@ const PublicPostsSearchLauncher = ({
|
||||
<Button
|
||||
className={styles.subscribePremiumButton}
|
||||
color="primary"
|
||||
size="smaller"
|
||||
noForcedUpperCase
|
||||
onClick={handleSubscribePremiumClick}
|
||||
>
|
||||
|
||||
@ -405,7 +405,6 @@ const SettingsPrivacy: FC<OwnProps & StateProps> = ({
|
||||
<Button
|
||||
color="primary"
|
||||
fluid
|
||||
size="smaller"
|
||||
noForcedUpperCase
|
||||
className="settings-unlock-button"
|
||||
onClick={handleAgeVerification}
|
||||
|
||||
@ -213,7 +213,6 @@ const SettingsFoldersMain: FC<OwnProps & StateProps> = ({
|
||||
// TODO: Refactor button component to handle icon placemenet with props
|
||||
className="settings-button with-icon"
|
||||
color="primary"
|
||||
size="smaller"
|
||||
pill
|
||||
fluid
|
||||
onClick={handleCreateFolder}
|
||||
|
||||
@ -339,7 +339,6 @@ const Giveaway = ({
|
||||
<Button
|
||||
className={styles.button}
|
||||
color="adaptive"
|
||||
size="smaller"
|
||||
onClick={handleShowInfoClick}
|
||||
>
|
||||
{lang('BoostingHowItWork')}
|
||||
|
||||
@ -167,7 +167,6 @@ const AboutAdsModal = ({ modal, minLevelToRestrictAds }: OwnProps & StateProps)
|
||||
>
|
||||
{regularAdContent}
|
||||
<Button
|
||||
size="smaller"
|
||||
onClick={handleClose}
|
||||
>
|
||||
{oldLang('RevenueSharingAdsUnderstood')}
|
||||
|
||||
@ -111,7 +111,6 @@ const ChatlistAlready: FC<OwnProps> = ({ invite, folder }) => {
|
||||
/>
|
||||
</div>
|
||||
<Button
|
||||
size="smaller"
|
||||
onClick={handleButtonClick}
|
||||
>
|
||||
<div className={styles.buttonText}>
|
||||
|
||||
@ -76,7 +76,6 @@ const ChatlistDelete: FC<OwnProps> = ({
|
||||
</>
|
||||
)}
|
||||
<Button
|
||||
size="smaller"
|
||||
onClick={handleButtonClick}
|
||||
>
|
||||
<div className={styles.buttonText}>
|
||||
|
||||
@ -82,7 +82,6 @@ const ChatlistNew: FC<OwnProps> = ({ invite }) => {
|
||||
</div>
|
||||
<Button
|
||||
onClick={handleButtonClick}
|
||||
size="smaller"
|
||||
disabled={!selectedPeerIds.length}
|
||||
>
|
||||
<div className={styles.buttonText}>
|
||||
|
||||
@ -70,7 +70,7 @@ const TableAboutModal = ({
|
||||
{withSeparator && <Separator className={styles.separator} />}
|
||||
{footer}
|
||||
{buttonText && (
|
||||
<Button size="smaller" onClick={onButtonClick || onClose}>{buttonText}</Button>
|
||||
<Button onClick={onButtonClick || onClose}>{buttonText}</Button>
|
||||
)}
|
||||
</Modal>
|
||||
);
|
||||
|
||||
@ -103,7 +103,6 @@ const TableInfoModal = ({
|
||||
{buttonText && (
|
||||
<Button
|
||||
className={!footer ? styles.noFooter : undefined}
|
||||
size="smaller"
|
||||
onClick={onButtonClick || onClose}
|
||||
>
|
||||
{buttonText}
|
||||
|
||||
@ -75,7 +75,6 @@ const FrozenAccountModal = ({
|
||||
<div className={styles.footer}>
|
||||
<Button
|
||||
className={styles.buttonAppeal}
|
||||
size="smaller"
|
||||
onClick={handleAppeal}
|
||||
noForcedUpperCase
|
||||
>
|
||||
@ -83,7 +82,6 @@ const FrozenAccountModal = ({
|
||||
</Button>
|
||||
<Button
|
||||
isText
|
||||
size="smaller"
|
||||
onClick={handleClose}
|
||||
noForcedUpperCase
|
||||
>
|
||||
|
||||
@ -250,7 +250,7 @@ const GiftInfoModal = ({
|
||||
const renderFooterButton = useLastCallback(() => {
|
||||
if (canBuyGift) {
|
||||
return (
|
||||
<Button noForcedUpperCase size="smaller" onClick={handleBuyGift}>
|
||||
<Button noForcedUpperCase onClick={handleBuyGift}>
|
||||
{lang('ButtonBuyGift', {
|
||||
stars: resellPrice?.currency === TON_CURRENCY_CODE
|
||||
? formatTonAsIcon(lang, resellPrice.amount, { shouldConvertFromNanos: true })
|
||||
@ -262,7 +262,7 @@ const GiftInfoModal = ({
|
||||
|
||||
if (canFocusUpgrade) {
|
||||
return (
|
||||
<Button size="smaller" onClick={handleFocusUpgraded}>
|
||||
<Button onClick={handleFocusUpgraded}>
|
||||
{lang('GiftInfoViewUpgraded')}
|
||||
</Button>
|
||||
);
|
||||
@ -270,7 +270,7 @@ const GiftInfoModal = ({
|
||||
|
||||
if (canManage && savedGift?.alreadyPaidUpgradeStars && !savedGift.upgradeMsgId) {
|
||||
return (
|
||||
<Button size="smaller" isShiny onClick={handleOpenUpgradeModal}>
|
||||
<Button isShiny onClick={handleOpenUpgradeModal}>
|
||||
{lang('GiftInfoUpgradeForFree')}
|
||||
<Icon name="arrow-down-circle" className={styles.upgradeIcon} />
|
||||
</Button>
|
||||
@ -279,7 +279,7 @@ const GiftInfoModal = ({
|
||||
|
||||
if (canManage && savedGift.canUpgrade && !savedGift.upgradeMsgId) {
|
||||
return (
|
||||
<Button size="smaller" isShiny onClick={handleOpenUpgradeModal}>
|
||||
<Button isShiny onClick={handleOpenUpgradeModal}>
|
||||
{lang('GiftInfoUpgrade')}
|
||||
<Icon name="arrow-down-circle" className={styles.upgradeIcon} />
|
||||
</Button>
|
||||
@ -287,7 +287,7 @@ const GiftInfoModal = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<Button size="smaller" onClick={handleClose}>
|
||||
<Button onClick={handleClose}>
|
||||
{lang('OK')}
|
||||
</Button>
|
||||
);
|
||||
|
||||
@ -163,7 +163,7 @@ const GiftResalePriceComposerModal = ({
|
||||
{lang('OnlyAcceptTONDescription')}
|
||||
</div>
|
||||
|
||||
<Button noForcedUpperCase disabled={!isPriceCorrect} size="smaller" onClick={handleSellGift}>
|
||||
<Button noForcedUpperCase disabled={!isPriceCorrect} onClick={handleSellGift}>
|
||||
{isPriceCorrect && lang('ButtonSellGift', {
|
||||
stars: isPriceInTon ? formatTonAsIcon(lang, price)
|
||||
: formatStarsAsIcon(lang, price, { asFont: true }),
|
||||
|
||||
@ -138,7 +138,6 @@ const GiftStatusInfoModal = ({
|
||||
return (
|
||||
<div className={styles.footer}>
|
||||
<Button
|
||||
size="smaller"
|
||||
onClick={onWearClick}
|
||||
>
|
||||
{lang('UniqueStatusWearButton')}
|
||||
|
||||
@ -132,7 +132,7 @@ const GiftUpgradeModal = ({ modal, recipient }: OwnProps & StateProps) => {
|
||||
const footer = (
|
||||
<div className={styles.footer}>
|
||||
{!gift && (
|
||||
<Button className={styles.footerButton} size="smaller" onClick={handleClose}>
|
||||
<Button className={styles.footerButton} onClick={handleClose}>
|
||||
{lang('OK')}
|
||||
</Button>
|
||||
)}
|
||||
@ -143,7 +143,7 @@ const GiftUpgradeModal = ({ modal, recipient }: OwnProps & StateProps) => {
|
||||
onCheck={setShouldKeepOriginalDetails}
|
||||
checked={shouldKeepOriginalDetails}
|
||||
/>
|
||||
<Button className={styles.footerButton} size="smaller" isShiny onClick={handleUpgrade}>
|
||||
<Button className={styles.footerButton} isShiny onClick={handleUpgrade}>
|
||||
{gift.alreadyPaidUpgradeStars
|
||||
? lang('GeneralConfirm')
|
||||
: lang('GiftUpgradeButton', {
|
||||
|
||||
@ -133,7 +133,7 @@ const GiftWithdrawModal = ({ modal, hasPassword, passwordHint }: OwnProps & Stat
|
||||
{!hasPassword && (
|
||||
<>
|
||||
<span className={styles.noPassword}>{lang('ErrorPasswordMissing')}</span>
|
||||
<Button className="mt-2" size="smaller" onClick={handleSetUpPassword}>{lang('SetUp2FA')}</Button>
|
||||
<Button className="mt-2" onClick={handleSetUpPassword}>{lang('SetUp2FA')}</Button>
|
||||
</>
|
||||
)}
|
||||
{hasPassword && !exportDelay && (
|
||||
|
||||
@ -152,7 +152,6 @@ const InviteViaLinkModal: FC<OwnProps & StateProps> = ({
|
||||
<Button
|
||||
withPremiumGradient
|
||||
isShiny
|
||||
size="smaller"
|
||||
onClick={handleOpenPremiumModal}
|
||||
>
|
||||
{lang('InvitePremiumBlockedSubscribe')}
|
||||
@ -185,7 +184,6 @@ const InviteViaLinkModal: FC<OwnProps & StateProps> = ({
|
||||
{canSendInviteLink && (
|
||||
<Button
|
||||
className={styles.sendInvites}
|
||||
size="smaller"
|
||||
onClick={handleSendInviteLink}
|
||||
disabled={!selectedMemberIds.length}
|
||||
>
|
||||
|
||||
@ -351,7 +351,6 @@ const PaidReactionModal = ({
|
||||
label={oldLang('StarsReactionShowMeInTopSenders')}
|
||||
/>
|
||||
<Button
|
||||
size="smaller"
|
||||
onClick={handleSend}
|
||||
>
|
||||
{lang('SendPaidReaction', { amount: starsAmount }, {
|
||||
|
||||
@ -163,7 +163,6 @@ const PreparedMessageModal: FC<OwnProps & StateProps> = ({
|
||||
{lang('WebAppShareMessageInfo', { user: getUserFullName(bot) })}
|
||||
</p>
|
||||
<Button
|
||||
size="smaller"
|
||||
onClick={handleOpenClick}
|
||||
>
|
||||
{lang('BotShareMessageShare')}
|
||||
|
||||
@ -219,7 +219,6 @@ const ReportModal = ({
|
||||
noReplaceNewlines
|
||||
/>
|
||||
<Button
|
||||
size="smaller"
|
||||
onClick={sendMessageReportHandler}
|
||||
disabled={!renderingSection.isOptional ? !text.length : undefined}
|
||||
>
|
||||
|
||||
@ -198,7 +198,7 @@ const StarPaymentModal = ({
|
||||
<div className={styles.description}>
|
||||
{renderText(descriptionText, ['simple_markdown', 'emoji'])}
|
||||
</div>
|
||||
<Button className={styles.paymentButton} size="smaller" onClick={handlePayment} isLoading={isLoading}>
|
||||
<Button className={styles.paymentButton} onClick={handlePayment} isLoading={isLoading}>
|
||||
{lang(isBotSubscription ? 'StarsSubscribeBotButtonMonth' : 'StarsPay', {
|
||||
amount: formatStarsAsIcon(lang, amount!, { asFont: true }),
|
||||
}, {
|
||||
|
||||
@ -217,7 +217,6 @@ const StarsSubscriptionModal: FC<OwnProps & StateProps> = ({
|
||||
)}
|
||||
{buttonState !== 'hidden' && (
|
||||
<Button
|
||||
size="smaller"
|
||||
color={buttonState === 'cancel' ? 'danger' : 'primary'}
|
||||
isText={buttonState === 'cancel'}
|
||||
onClick={handleButtonClick}
|
||||
|
||||
@ -282,7 +282,6 @@ const SuggestMessageModal = ({
|
||||
<Button
|
||||
className={styles.offerButton}
|
||||
onClick={handleOffer}
|
||||
size="smaller"
|
||||
disabled={isDisabled}
|
||||
>
|
||||
{isInSuggestChangesMode ? lang('ButtonUpdateTerms')
|
||||
|
||||
@ -126,7 +126,7 @@ const SuggestedStatusModal = ({ modal, currentUser, bot }: OwnProps & StateProps
|
||||
withEmojiStatus
|
||||
/>
|
||||
)}
|
||||
<Button size="smaller" onClick={handleSetStatus}>
|
||||
<Button onClick={handleSetStatus}>
|
||||
{lang('GeneralConfirm')}
|
||||
</Button>
|
||||
</Modal>
|
||||
|
||||
@ -799,7 +799,7 @@ const Profile: FC<OwnProps & StateProps> = ({
|
||||
{!isCurrentUserPremium && (
|
||||
<>
|
||||
{}
|
||||
<Button className="show-more-channels" size="smaller" onClick={() => openPremiumModal()}>
|
||||
<Button className="show-more-channels" onClick={() => openPremiumModal()}>
|
||||
{oldLang('UnlockSimilar')}
|
||||
<Icon name="unlock-badge" />
|
||||
</Button>
|
||||
@ -838,7 +838,7 @@ const Profile: FC<OwnProps & StateProps> = ({
|
||||
{!isCurrentUserPremium && (
|
||||
<>
|
||||
{}
|
||||
<Button className="show-more-bots" size="smaller" onClick={() => openPremiumModal()}>
|
||||
<Button className="show-more-bots" onClick={() => openPremiumModal()}>
|
||||
{lang('UnlockMoreSimilarBots')}
|
||||
<Icon name="unlock-badge" />
|
||||
</Button>
|
||||
|
||||
@ -255,7 +255,6 @@ const MonetizationStatistics = ({
|
||||
{renderAvailableReward()}
|
||||
|
||||
<Button
|
||||
size="smaller"
|
||||
type="button"
|
||||
onClick={verificationMonetizationHandler}
|
||||
disabled={!canWithdraw}
|
||||
|
||||
@ -110,7 +110,6 @@ const StealthModeModal = ({ isOpen, stealthMode, isCurrentUserPremium }: StatePr
|
||||
</ListItem>
|
||||
<Button
|
||||
className={styles.button}
|
||||
size="smaller"
|
||||
disabled={isOnCooldown}
|
||||
isShiny={!isCurrentUserPremium}
|
||||
withPremiumGradient={!isCurrentUserPremium}
|
||||
|
||||
@ -28,7 +28,6 @@ const ShowMoreButton: FC<OwnProps> = ({
|
||||
<Button
|
||||
className="ShowMoreButton"
|
||||
color="translucent"
|
||||
size="smaller"
|
||||
isText
|
||||
isLoading={isLoading}
|
||||
isRtl={lang.isRtl}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user