-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af064cf
commit 7ac83df
Showing
8 changed files
with
93 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,18 @@ | ||
import React from "react" | ||
import Marquee from "react-fast-marquee" | ||
|
||
import GreaterThanUnderscoreIcon from "@site/static/icons/basic/gt-undescore-gray.svg" | ||
import TrustedByMarquee from "@site/src/components/home/TrustedByMarquee" | ||
import {partnerImages} from "@site/src/constants" | ||
import React from "react" | ||
|
||
const Partners = (): JSX.Element => { | ||
const Partners = () => { | ||
const handleClick = () => { | ||
window.open("/docs/deploy-graphql-github-actions/", "_blank") | ||
} | ||
|
||
return ( | ||
<section className="px-10 md:px-0 cursor-pointer" onClick={handleClick}> | ||
<div className="text-content-small font-bold sm:text-title-tiny lg:text-title-small text-tailCall-light-500 text-center space-x-1"> | ||
<GreaterThanUnderscoreIcon className="h-4 w-6" /> | ||
<span>Deploy Anywhere</span> | ||
</div> | ||
<Marquee autoFill> | ||
<div className="hidden sm:flex space-x-SPACE_16 mt-SPACE_10 overflow-hidden"> | ||
{partnerImages.map((partner, index) => ( | ||
<div key={index} className="h-20"> | ||
<img src={partner.logo} alt={partner.name} className="max-w-[152px]" /> | ||
</div> | ||
))} | ||
</div> | ||
</Marquee> | ||
<div className="sm:hidden flex items-center justify-around flex-wrap mt-SPACE_06 space-y-SPACE_02"> | ||
{partnerImages.map((partner, index) => ( | ||
<div key={index} className="h-20"> | ||
<img src={partner.logo} alt={partner.name} className="max-w-[152px]" /> | ||
</div> | ||
))} | ||
</div> | ||
</section> | ||
<TrustedByMarquee | ||
logos={partnerImages} | ||
onClick={handleClick} | ||
/> | ||
) | ||
} | ||
|
||
export default Partners | ||
export default Partners |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import React from "react" | ||
import Marquee from "react-fast-marquee" | ||
import GreaterThanUnderscoreIcon from "@site/static/icons/basic/gt-undescore-gray.svg" | ||
|
||
interface LogoItem { | ||
logo: string | ||
name: string | ||
link?: string | ||
} | ||
|
||
interface TrustedByMarqueeProps { | ||
title?: string | ||
logos: LogoItem[] | ||
onClick?: () => void | ||
titleClassName?: string | ||
desktopClassName?: string | ||
mobileClassName?: string | ||
} | ||
|
||
const TrustedByMarquee: React.FC<TrustedByMarqueeProps> = ({ | ||
title = "Deploy Anywhere", | ||
logos, | ||
onClick, | ||
titleClassName = "text-content-small font-bold sm:text-title-tiny lg:text-title-small text-tailCall-light-500 text-center space-x-1", | ||
desktopClassName = "hidden sm:flex space-x-SPACE_16 mt-SPACE_10 overflow-hidden", | ||
mobileClassName = "sm:hidden flex items-center justify-around flex-wrap mt-SPACE_06 space-y-SPACE_02" | ||
}) => { | ||
const handleClick = () => { | ||
if (onClick) { | ||
onClick(); | ||
} | ||
} | ||
|
||
const renderLogo = (partner: LogoItem) => ( | ||
<div key={partner.name} className="h-20"> | ||
{partner.link ? ( | ||
<a href={partner.link} target="_blank" rel="noopener noreferrer"> | ||
<img src={partner.logo} alt={partner.name} className="max-w-[152px]" /> | ||
</a> | ||
) : ( | ||
<img src={partner.logo} alt={partner.name} className="max-w-[152px]" /> | ||
)} | ||
</div> | ||
); | ||
|
||
return ( | ||
<section | ||
className={`px-10 md:px-0 ${onClick ? 'cursor-pointer' : ''}`} | ||
onClick={handleClick} | ||
> | ||
<div className={titleClassName}> | ||
<GreaterThanUnderscoreIcon className="h-4 w-6" /> | ||
<span>{title}</span> | ||
</div> | ||
|
||
<Marquee autoFill> | ||
<div className={desktopClassName}> | ||
{logos.map(renderLogo)} | ||
</div> | ||
</Marquee> | ||
|
||
<div className={mobileClassName}> | ||
{logos.map(renderLogo)} | ||
</div> | ||
</section> | ||
) | ||
} | ||
|
||
export default TrustedByMarquee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.