-
Notifications
You must be signed in to change notification settings - Fork 1
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
Create LinkButton component #44
Conversation
return ( | ||
<Link | ||
href={href} | ||
className="usa-button hover:bg-red items-center justify-start gap-2.5 rounded border-2 border-[#224a58] bg-white px-5 py-3 hover:border-2" |
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.
Is there a way to tell in Figma what the hover state of the button should look like? I put very obvious placeholders (like the hover:bg-red
here) that I figured we could update later. If we already have this info somewhere, let me know and I can make the update!
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 don't think there is. The way i've seen designers do it is they specifically have a section with all the button states. I don't see that on figma for this
className={classNames('text-white', { | ||
underline: isActive, |
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.
This is the main change so that we get the underlining. Otherwise, I just cleaned up some styling we didn't need.
Issue: CDCgov/phdi#2872
This PR adds the
LinkButton
component, which is a Next.js link stylized to look like a USWDSButton
component. This component will be used on the following pages:I've updated both the "home" and "our products" pages to make use of this new component.
Note that the
Send inquiry
button on the "Engage with us" page is a form submission button rather than a link, so this component won't be used there.Additionally, I made a small correction to the
NavigationLink
component so that the nav link of the page we're currently looking at will be underlined, which matches the Figma design.Here's an example: