|
| 1 | +import { useId } from 'react'; |
| 2 | +import { |
| 3 | + CallToAction, |
| 4 | + cn, |
| 5 | + ContactButton, |
| 6 | + DecorationIsolation, |
| 7 | + Heading, |
| 8 | +} from '@theguild/components'; |
| 9 | + |
| 10 | +/** |
| 11 | + * This component differs from the `GetYourAPIGameRightSection` |
| 12 | + * from `@theguild/components` by having a list of items. |
| 13 | + */ |
| 14 | +export function GetYourAPIGameRightList({ className }: { className?: string }) { |
| 15 | + return ( |
| 16 | + <section className={cn(className, 'bg-primary relative overflow-hidden rounded-3xl')}> |
| 17 | + <DecorationIsolation> |
| 18 | + <StrokeDecoration className="absolute right-0 top-[-184px] max-md:size-[312px] max-md:rotate-90 max-md:-scale-y-100 md:bottom-0 lg:right-[696px]" /> |
| 19 | + </DecorationIsolation> |
| 20 | + <div className="flex items-stretch justify-between gap-x-8 gap-y-10 px-4 py-6 max-lg:flex-col md:items-center md:p-24 md:px-12 xl:px-[120px]"> |
| 21 | + <Heading |
| 22 | + as="h2" |
| 23 | + size="md" |
| 24 | + className="text-[40px] leading-[1.2] tracking-[-0.2px] max-sm:text-balance max-sm:text-center max-sm:text-[32px]/[1.25] md:text-[56px] md:leading-[1.142586] md:tracking-[-0.56px]" |
| 25 | + > |
| 26 | + Get your |
| 27 | + <br className="max-lg:hidden" /> API game right. |
| 28 | + </Heading> |
| 29 | + <div> |
| 30 | + <ul className="flex shrink-0 flex-col gap-6 font-medium md:whitespace-nowrap xl:text-xl"> |
| 31 | + <li className="flex gap-2 md:items-center"> |
| 32 | + <CheckmarkCircle /> |
| 33 | + Built by engineers to improve developer experience |
| 34 | + </li> |
| 35 | + <li className="flex gap-2 md:items-center"> |
| 36 | + <CheckmarkCircle /> |
| 37 | + Driven by customers |
| 38 | + </li> |
| 39 | + <li className="flex gap-2 md:items-center"> |
| 40 | + <CheckmarkCircle /> |
| 41 | + No vendor lock-in |
| 42 | + </li> |
| 43 | + </ul> |
| 44 | + <div className="mt-8 flex gap-x-4 gap-y-2 whitespace-pre max-sm:flex-col"> |
| 45 | + <CallToAction variant="secondary-inverted" href="https://app.graphql-hive.com/"> |
| 46 | + Get started for free |
| 47 | + </CallToAction> |
| 48 | + <ContactButton variant="tertiary">Talk to us</ContactButton> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + </section> |
| 53 | + ); |
| 54 | +} |
| 55 | + |
| 56 | +function CheckmarkCircle() { |
| 57 | + return ( |
| 58 | + <div className="h-min grow-0 rounded-full border p-[3px] max-md:mt-px"> |
| 59 | + <svg |
| 60 | + xmlns="http://www.w3.org/2000/svg" |
| 61 | + width="16" |
| 62 | + height="16" |
| 63 | + viewBox="0 0 16 17" |
| 64 | + fill="currentColor" |
| 65 | + className="translate-y-[0.5px]" |
| 66 | + > |
| 67 | + <path d="M6.66668 10.163L12.7947 4.03564L13.7373 4.97831L6.66668 12.049L2.42401 7.80631L3.36668 6.86364L6.66668 10.163Z" /> |
| 68 | + </svg> |
| 69 | + </div> |
| 70 | + ); |
| 71 | +} |
| 72 | + |
| 73 | +function StrokeDecoration(props: React.SVGAttributes<SVGSVGElement>) { |
| 74 | + const id = useId(); |
| 75 | + return ( |
| 76 | + <svg |
| 77 | + xmlns="http://www.w3.org/2000/svg" |
| 78 | + width="492" |
| 79 | + height="409" |
| 80 | + viewBox="0 0 492 409" |
| 81 | + {...props} |
| 82 | + > |
| 83 | + <path |
| 84 | + d="M475.973 311.082C485.909 301.145 491.5 287.658 491.5 273.616L491.5 0.5L389.821 0.499999L389.821 309.081C389.821 353.676 353.676 389.821 309.081 389.821L0.500001 389.821L0.5 491.5L273.616 491.5C287.658 491.5 301.145 485.909 311.082 475.973L388.967 398.088L398.088 388.967L475.973 311.082Z" |
| 85 | + stroke={`url(#${id})`} |
| 86 | + fill="none" |
| 87 | + /> |
| 88 | + <defs> |
| 89 | + <linearGradient |
| 90 | + id={id} |
| 91 | + x1="246" |
| 92 | + y1="234.671" |
| 93 | + x2="476.625" |
| 94 | + y2="483.908" |
| 95 | + gradientUnits="userSpaceOnUse" |
| 96 | + > |
| 97 | + <stop stopColor="#A2C1C4" stopOpacity="0" /> |
| 98 | + <stop offset="1" stopColor="#A2C1C4" stopOpacity="0.8" /> |
| 99 | + </linearGradient> |
| 100 | + </defs> |
| 101 | + </svg> |
| 102 | + ); |
| 103 | +} |
0 commit comments