-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor logo into logo-link #621
Conversation
20ec28a
to
76307eb
Compare
src/stories/Library/logo/Logo.tsx
Outdated
<figure className="logo-link__content"> | ||
{hasImage && <img className="logo" src={logo} alt={altText} />} | ||
<div | ||
className={`logo-link__description ${ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably use clsx here, not that it makes a big difference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
The current logo CSS / markup is outdated. This refactors the logo component so that it displays the image, and / or the library name / place accordingly. This also moves css for the logo away from "Header", as the logo is used elsewhere that the header as well. Additionally the story has been updated, and any component using the <logo/> component has has its' props updated in accordance with the changes. This also introduces an aria-label for the logo, which was requested in a seperate ticket: DDFFORM-750 DDFFORM-696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked chromatic, and it looks good.
Link to issue
PR dækker to tickets:
DDFFORM-696
DDFFORM-709
Depends on PR in cms: danskernesdigitalebibliotek/dpl-cms#1099
Description
This PR refators the logo markup/css.
The component should now be updated to handle the redirect to frontpage, include an aria-label as requested in DDFFORM-709, and display the image/ fallback of library name and place accordingly.
I have left the UI changes unaccepted until reviewed.