Skip to content

Commit 3aa129c

Browse files
committed
Use core button for logged out accept invite button
1 parent 936825f commit 3aa129c

File tree

6 files changed

+8
-53
lines changed

6 files changed

+8
-53
lines changed

client/blocks/signup-form/signup-submit-button.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ interface SignupSubmitButtonProps {
88
variationName?: string;
99
children: ReactNode;
1010
className?: string;
11+
onClick?: () => void;
1112
}
1213

1314
const SignupSubmitButton = ( {
@@ -16,6 +17,7 @@ const SignupSubmitButton = ( {
1617
variationName,
1718
children,
1819
className,
20+
onClick,
1921
}: SignupSubmitButtonProps ) => {
2022
return (
2123
<Button
@@ -28,6 +30,7 @@ const SignupSubmitButton = ( {
2830
) }
2931
disabled={ isDisabled }
3032
isBusy={ isBusy }
33+
onClick={ onClick }
3134
__next40pxDefaultSize
3235
>
3336
{ children }

client/jetpack-connect/style.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,11 +1037,6 @@ $colophon-height: 50px;
10371037
color: var(--color-neutral-80);
10381038
}
10391039

1040-
.signup-form__submit {
1041-
border: 0;
1042-
box-shadow: none;
1043-
}
1044-
10451040
.jetpack-header__partner-logo-plus svg {
10461041
stroke: var(--color-neutral-80);
10471042
}

client/login/wp-login/style.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $image-height: 47px;
1919
padding-bottom: $image-height;
2020
min-height: calc(100% - #{$image-height});
2121
}
22-
22+
2323
.layout__content {
2424
position: static;
2525
}
@@ -315,7 +315,6 @@ $image-height: 47px;
315315
}
316316

317317
.login .button.is-primary {
318-
// Note: Matches primary button to `button.signup-form__submit`
319318
background-color: var(--studio-wordpress-blue, #3858e9);
320319
color: var(--color-text-inverted);
321320
box-shadow: none;
@@ -363,7 +362,7 @@ $image-height: 47px;
363362
// following overrides could be safely deleted.
364363
input:not(.components-text-control__input),
365364
button:not(.components-button) {
366-
/* Note: Same as `button.signup-form__submit, .signup-form__input.form-text-input` */
365+
/* Note: Same as `.signup-form__input.form-text-input` */
367366
height: 40px; // Matches .components-button height __next40pxDefaultSize
368367
border: 1px solid var(--studio-gray-10);
369368
font-size: $font-body;

client/my-sites/invites/invite-accept-logged-out/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Component } from 'react';
66
import { connect } from 'react-redux';
77
import store from 'store';
88
import SignupForm from 'calypso/blocks/signup-form';
9-
import FormButton from 'calypso/components/forms/form-button';
9+
import SignupSubmitButton from 'calypso/blocks/signup-form/signup-submit-button';
1010
import LoggedOutFormLinkItem from 'calypso/components/logged-out-form/link-item';
1111
import LoggedOutFormLinks from 'calypso/components/logged-out-form/links';
1212
import { recordTracksEvent } from 'calypso/lib/analytics/tracks';
@@ -150,9 +150,9 @@ class InviteAcceptLoggedOut extends Component {
150150
<div className="logged-out-form">
151151
{ this.renderFormHeader() }
152152
<Card className="logged-out-form__footer">
153-
<FormButton className="signup-form__submit" onClick={ this.clickSignInLink }>
153+
<SignupSubmitButton onClick={ this.clickSignInLink }>
154154
{ this.props.translate( 'Sign In' ) }
155-
</FormButton>
155+
</SignupSubmitButton>
156156
</Card>
157157
</div>
158158
</div>

client/my-sites/invites/invite-accept-logged-out/style.scss

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,6 @@ body.is-section-accept-invite {
5252
max-width: 372px;
5353
background: none;
5454

55-
button.is-primary {
56-
border-radius: 2px;
57-
border: 1px solid var(--studio-wordpress-blue, #3858e9);
58-
background: var(--studio-wordpress-blue, #3858e9);
59-
height: 48px;
60-
font-weight: 500;
61-
&:hover {
62-
background: var(--studio-wordpress-blue-60);
63-
}
64-
&:focus {
65-
background-color: var(--studio-wordpress-blue-60);
66-
border-color: var(--studio-wordpress-blue-60);
67-
color: var(--color-text-inverted);
68-
box-shadow: none;
69-
}
70-
&:disabled {
71-
background: var(--studio-gray-20);
72-
border: 1px solid var(--studio-gray-20);
73-
color: var(--color-surface);
74-
}
75-
}
7655
label.form-label {
7756
color: var(--studio-gray-60, #50575e);
7857
font-size: 0.875rem;

client/signup/style.scss

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -307,27 +307,6 @@ body.is-section-signup .layout:not(.dops):not(.is-wccom-oauth-flow) {
307307

308308
.signup__step.is-user,
309309
.signup__step.is-user-social {
310-
.button.signup-form__submit[disabled],
311-
.button.signup-form__submit:disabled,
312-
.button.signup-form__submit.disabled {
313-
background-color: var(--studio-gray-20);
314-
color: var(--color-surface);
315-
}
316-
317-
.button.signup-form__submit {
318-
border-radius: 4px;
319-
max-width: 408px;
320-
height: 44px;
321-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
322-
font-weight: 500;
323-
letter-spacing: 0.32px;
324-
line-height: 17px;
325-
326-
&.newsletter-signup-form {
327-
background-color: var(--color-primary);
328-
}
329-
}
330-
331310
.signup-form__terms-of-service-link {
332311
text-align: start;
333312
font-size: 0.875rem;

0 commit comments

Comments
 (0)