Skip to content

Commit

Permalink
Converting link property to button.
Browse files Browse the repository at this point in the history
  • Loading branch information
erinesullivan committed Aug 18, 2023
1 parent fc0f4d1 commit 1e51a8a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
11 changes: 2 additions & 9 deletions src/modules/core/components/SearchHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,9 @@ function SearchHeader (props) {
marginRight: '1rem',
marginBottom: '0.5rem'
},
'a, button.link': {
background: 'none',
border: '0',
color: 'white',
fontFamily: 'inherit',
margin: '0',
padding: '0',
a: {
textDecoration: 'none',
'&:hover': {
cursor: 'pointer',
textDecoration: 'underline'
}
},
Expand All @@ -48,7 +41,7 @@ function SearchHeader (props) {
}}
>
<a href='https://account.lib.umich.edu/'>Account</a>
<Authentication logout={props.isAuthenticated} link />
<Authentication logout={props.isAuthenticated} />
</nav>
</m-website-header>
);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/getthis/components/GetThisOptionList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function GetThisOptions (props) {
if (status === 'Not logged in') {
return (
<Section>
<Authentication>
<Authentication button>
<span className='strong'>Log in</span> to view request options
</Authentication>
</Section>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/profile/components/Authentication/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function Authentication (props) {
return (
<a
href={props.logout ? config.logoutUrl : config.loginUrl}
className={props.link ? 'link' : 'button'}
className={props.button && 'button'}
>
{props.children || 'Log ' + (props.logout ? 'out' : 'in')}
</a>
Expand All @@ -15,7 +15,7 @@ export default function Authentication (props) {

Authentication.propTypes = {
logout: PropTypes.bool,
link: PropTypes.bool,
button: PropTypes.bool,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function AuthenticationRequired (props) {
}

return (
<Authentication>
<Authentication button>
<span className='strong'>Log in</span> to continue
</Authentication>
);
Expand Down

0 comments on commit 1e51a8a

Please sign in to comment.