diff --git a/frontend/src/lib/components/SocialLoginButton/SocialLoginButton.tsx b/frontend/src/lib/components/SocialLoginButton/SocialLoginButton.tsx index 2f90e0ea44f63..46b395fc85fb9 100644 --- a/frontend/src/lib/components/SocialLoginButton/SocialLoginButton.tsx +++ b/frontend/src/lib/components/SocialLoginButton/SocialLoginButton.tsx @@ -4,7 +4,6 @@ import { combineUrl, router } from 'kea-router' import { SSO_PROVIDER_NAMES } from 'lib/constants' import { LemonButton } from 'lib/lemon-ui/LemonButton' import { LemonDivider } from 'lib/lemon-ui/LemonDivider' -import { useButtonStyle } from 'scenes/authentication/useButtonStyles' import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic' import { SSOProvider } from '~/types' @@ -116,7 +115,6 @@ interface SSOEnforcedLoginButtonProps { } export function SSOEnforcedLoginButton({ provider, email }: SSOEnforcedLoginButtonProps): JSX.Element { - const buttonStyles = useButtonStyle() return ( Log in with {SSO_PROVIDER_NAMES[provider]} diff --git a/frontend/src/scenes/authentication/Login.tsx b/frontend/src/scenes/authentication/Login.tsx index 6e3045f29b51b..48eff24151ecf 100644 --- a/frontend/src/scenes/authentication/Login.tsx +++ b/frontend/src/scenes/authentication/Login.tsx @@ -18,7 +18,6 @@ import { loginLogic } from './loginLogic' import { redirectIfLoggedInOtherInstance } from './redirectToLoggedInInstance' import RegionSelect from './RegionSelect' import { SupportModalButton } from './SupportModalButton' -import { useButtonStyle } from './useButtonStyles' export const ERROR_MESSAGES: Record = { no_new_organizations: @@ -58,7 +57,6 @@ export function Login(): JSX.Element { const passwordInputRef = useRef(null) const isPasswordHidden = precheckResponse.status === 'pending' || precheckResponse.sso_enforcement - const buttonStyles = useButtonStyle() useEffect(() => { if (preflight?.cloud) { @@ -150,7 +148,8 @@ export function Login(): JSX.Element { type="primary" center loading={isLoginSubmitting || precheckResponseLoading} - {...buttonStyles} + status="primary-alt" + size="large" > Log in diff --git a/frontend/src/scenes/authentication/Login2FA.tsx b/frontend/src/scenes/authentication/Login2FA.tsx index c1bb53c1e59d4..735c6be408cdf 100644 --- a/frontend/src/scenes/authentication/Login2FA.tsx +++ b/frontend/src/scenes/authentication/Login2FA.tsx @@ -7,12 +7,10 @@ import { LemonBanner } from 'lib/lemon-ui/LemonBanner' import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic' import { login2FALogic } from './login2FALogic' -import { useButtonStyle } from './useButtonStyles' export function Login2FA(): JSX.Element { const { isTwofactortokenSubmitting, generalError } = useValues(login2FALogic) const { preflight } = useValues(preflightLogic) - const buttonStyles = useButtonStyle() return ( Login diff --git a/frontend/src/scenes/authentication/PasswordReset.tsx b/frontend/src/scenes/authentication/PasswordReset.tsx index a3a7590cd48c9..02c0e7d68900e 100644 --- a/frontend/src/scenes/authentication/PasswordReset.tsx +++ b/frontend/src/scenes/authentication/PasswordReset.tsx @@ -15,7 +15,6 @@ import { SceneExport } from 'scenes/sceneTypes' import { passwordResetLogic } from './passwordResetLogic' import { SupportModalButton } from './SupportModalButton' -import { useButtonStyle } from './useButtonStyles' export const scene: SceneExport = { component: PasswordReset, @@ -87,7 +86,6 @@ function EmailUnavailable(): JSX.Element { function ResetForm(): JSX.Element { const { isRequestPasswordResetSubmitting } = useValues(passwordResetLogic) - const buttonStyles = useButtonStyle() return (
@@ -111,7 +109,8 @@ function ResetForm(): JSX.Element { htmlType="submit" data-attr="password-reset" loading={isRequestPasswordResetSubmitting} - {...buttonStyles} + status="primary-alt" + size="large" > Continue @@ -122,7 +121,6 @@ function ResetForm(): JSX.Element { function ResetSuccess(): JSX.Element { const { requestPasswordReset } = useValues(passwordResetLogic) const { push } = useActions(router) - const buttonStyles = useButtonStyle() return (
@@ -135,7 +133,8 @@ function ResetSuccess(): JSX.Element { center fullWidth onClick={() => push('/login')} - {...buttonStyles} + status="primary-alt" + size="large" > Back to login @@ -147,7 +146,6 @@ function ResetSuccess(): JSX.Element { function ResetThrottled(): JSX.Element { const { requestPasswordReset } = useValues(passwordResetLogic) const { push } = useActions(router) - const buttonStyles = useButtonStyle() return (
@@ -164,7 +162,8 @@ function ResetThrottled(): JSX.Element { center fullWidth onClick={() => push('/login')} - {...buttonStyles} + status="primary-alt" + size="large" > Back to login diff --git a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel1.tsx b/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel1.tsx index 088644afa997d..d6defe41a7ce1 100644 --- a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel1.tsx +++ b/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel1.tsx @@ -6,7 +6,6 @@ import { SocialLoginButtons } from 'lib/components/SocialLoginButton/SocialLogin import { Field } from 'lib/forms/Field' import { Link } from 'lib/lemon-ui/Link' import { useEffect, useRef } from 'react' -import { useButtonStyle } from 'scenes/authentication/useButtonStyles' import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic' import { signupLogic } from '../signupLogic' @@ -15,7 +14,6 @@ export function SignupPanel1(): JSX.Element | null { const { preflight } = useValues(preflightLogic) const { isSignupPanel1Submitting, signupPanel1 } = useValues(signupLogic) const emailInputRef = useRef(null) - const buttonStyles = useButtonStyle() useEffect(() => { // There's no password in the demo environment @@ -74,7 +72,8 @@ export function SignupPanel1(): JSX.Element | null { data-attr="signup-start" loading={isSignupPanel1Submitting} disabled={isSignupPanel1Submitting} - {...buttonStyles} + status="primary-alt" + size="large" > Continue diff --git a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel2.tsx b/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel2.tsx index a6d893ca97537..54f4c516a371f 100644 --- a/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel2.tsx +++ b/frontend/src/scenes/authentication/signup/signupForm/panels/SignupPanel2.tsx @@ -4,7 +4,6 @@ import { Form } from 'kea-forms' import SignupReferralSource from 'lib/components/SignupReferralSource' import SignupRoleSelect from 'lib/components/SignupRoleSelect' import { Field } from 'lib/forms/Field' -import { useButtonStyle } from 'scenes/authentication/useButtonStyles' import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic' import { signupLogic } from '../signupLogic' @@ -14,7 +13,6 @@ const UTM_TAGS = 'utm_campaign=in-product&utm_tag=signup-header' export function SignupPanel2(): JSX.Element | null { const { preflight } = useValues(preflightLogic) const { isSignupPanel2Submitting } = useValues(signupLogic) - const buttonStyles = useButtonStyle() return (
@@ -47,7 +45,8 @@ export function SignupPanel2(): JSX.Element | null { data-attr="signup-submit" loading={isSignupPanel2Submitting} disabled={isSignupPanel2Submitting} - {...buttonStyles} + status="primary-alt" + size="large" > {!preflight?.demo ? 'Create account' diff --git a/frontend/src/scenes/authentication/useButtonStyles.ts b/frontend/src/scenes/authentication/useButtonStyles.ts deleted file mode 100644 index 1bf99b9aba59a..0000000000000 --- a/frontend/src/scenes/authentication/useButtonStyles.ts +++ /dev/null @@ -1,7 +0,0 @@ -// TODO: replace with inline props? -export function useButtonStyle(): Record { - return { - status: 'primary-alt', - size: 'large', - } -}