Skip to content

Commit

Permalink
Update button styles to look better disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenDufresne committed Jul 8, 2024
1 parent d192463 commit 5447e2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion settings/src/components/email-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ export default function EmailAddress() {

<p className="wporg-2fa__submit-actions">
<Button
variant="primary"
onClick={ handleSave }
disabled={ ! hasEdits || isSaving }
isPrimary={ hasEdits }
isSecondary={ ! hasEdits }
>
{ isSaving ? (
<>
Expand Down
7 changes: 6 additions & 1 deletion settings/src/components/password.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ export default function Password() {
) }

<p className="wporg-2fa__submit-actions">
<Button isPrimary disabled={ ! editedRecord.password } type="submit">
<Button
isPrimary={ editedRecord.password }
isSecondary={ ! editedRecord.password }
disabled={ ! editedRecord.password }
type="submit"
>
{ isSaving ? 'Saving...' : 'Save password' }
</Button>

Expand Down

0 comments on commit 5447e2e

Please sign in to comment.