refactor(client): migrate buttons on the settings page to ui-components (#53739)

This commit is contained in:
Huyen Nguyen
2024-03-08 14:15:03 +07:00
committed by GitHub
parent 095d44fc53
commit 138a80f6ca
31 changed files with 119 additions and 182 deletions

View File

@@ -1,4 +1,3 @@
import { Button } from '@freecodecamp/react-bootstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faRightToBracket } from '@fortawesome/free-solid-svg-icons';
import React, { ReactNode } from 'react';
@@ -32,8 +31,7 @@ const Login = ({
const href = isSignedIn ? `${homeLocation}/learn` : `${apiLocation}/signin`;
return (
<Button
bsStyle='default'
<a
className={(block ? 'btn-cta-big btn-block' : '') + ' signup-btn btn-cta'}
data-test-label={dataTestLabel}
data-playwright-test-label='header-sign-in-button'
@@ -44,7 +42,7 @@ const Login = ({
<span className='sr-only'> {t('buttons.sign-in')}</span>
</span>
<span className='login-btn-text'>{children || t('buttons.sign-in')}</span>
</Button>
</a>
);
};

View File

@@ -342,6 +342,7 @@ li > button.nav-link-signout:not([aria-disabled='true']):is(:hover, :focus) {
max-height: var(--header-element-size);
min-width: var(--header-element-size);
padding: 0 4px;
text-decoration: none;
}
@media (min-width: 601px) {