Skip to content

Commit

Permalink
feat(healButtons): Added heal buttons to components
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisraymond-uchicago committed Nov 5, 2024
1 parent 698507d commit 7d42089
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/lib/Home/Components/ContentSpotlight/ContentSpotlight.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import HealButtonLink from '../HealButtonLink/HealButtonLink';

const ContentSpotlight: React.FC = () => {
return (
Expand All @@ -7,6 +8,7 @@ const ContentSpotlight: React.FC = () => {
className="content-spotlight text-center p-4"
>
<h1 className="text-2xl font-bold">Content Spotlight</h1>
<HealButtonLink href="https://lycos.com" label="Go to Semantic Search" />
</div>
);
};
Expand Down
6 changes: 2 additions & 4 deletions src/lib/Home/Components/HealButtonLink/HealButtonLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ interface ButtonLinkProps {
label: string;
}

const HealButtonLink: React.FC<ButtonLinkProps> = ({
href = 'https://www.altavista.com',
label,
}) => {
const HealButtonLink: React.FC<ButtonLinkProps> = ({ href, label }) => {
return (
<a
href={href}
Expand All @@ -32,6 +29,7 @@ const HealButtonLink: React.FC<ButtonLinkProps> = ({
>
<span
className={`
px-2
group-hover:bg-white
group-hover:text-heal-magenta
bg-heal-magenta
Expand Down
5 changes: 4 additions & 1 deletion src/lib/Home/Components/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ const Hero: React.FC = () => {
return (
<div data-testid="hero" className="photo-divider text-center p-4">
<h1 className="text-2xl font-bold">Hero</h1>
<HealButtonLink label="Search for HEAL Data" />
<HealButtonLink
href="https://askjeeves.com"
label="Search for HEAL Data"
/>
</div>
);
};
Expand Down

0 comments on commit 7d42089

Please sign in to comment.