|
| 1 | +import { Tab, Tabs, TabList, TabPanel } from "react-tabs"; |
| 2 | +import MapSvg from "~/assets/network-map.svg?raw"; |
| 3 | + |
| 4 | +const tabs = ["Overview", "Connect & Protect", "Build"]; |
| 5 | + |
| 6 | +const connectCards = [ |
| 7 | + { |
| 8 | + label: "For websites & web apps", |
| 9 | + description: "DNS, CDN, L7 DDoS protection, WAF, and more.", |
| 10 | + cta: { |
| 11 | + primary: { |
| 12 | + label: "Proxy your domain", |
| 13 | + href: "/fundamentals/setup/manage-domains/connect-your-domain/", |
| 14 | + }, |
| 15 | + secondary: { |
| 16 | + label: "All application services", |
| 17 | + href: "/products/?product-group=Analytics%2CApplication+performance%2CApplication+security%2CCloudflare+essentials", |
| 18 | + }, |
| 19 | + }, |
| 20 | + }, |
| 21 | + { |
| 22 | + label: "For internal networking & Zero Trust security", |
| 23 | + description: "Access, Gateway, Tunnels, CASB, and more.", |
| 24 | + cta: { |
| 25 | + primary: { |
| 26 | + label: "Set up Zero Trust", |
| 27 | + href: "/cloudflare-one/setup/", |
| 28 | + }, |
| 29 | + secondary: { |
| 30 | + label: "All Zero Trust services", |
| 31 | + href: "/products/?product-group=Cloudflare+One", |
| 32 | + }, |
| 33 | + }, |
| 34 | + }, |
| 35 | + { |
| 36 | + label: "For public, private, and hybrid networks", |
| 37 | + description: "L3 DDoS protection, firewall, interconnects, and more.", |
| 38 | + cta: { |
| 39 | + primary: { |
| 40 | + label: "Onramp your network", |
| 41 | + href: "/TODO/", |
| 42 | + }, |
| 43 | + secondary: { |
| 44 | + label: "All network services", |
| 45 | + href: "/products/?product-group=Network+security", |
| 46 | + }, |
| 47 | + }, |
| 48 | + }, |
| 49 | + { |
| 50 | + label: "For personal devices and home networks", |
| 51 | + description: "1.1.1.1, WARP client, and Radar.", |
| 52 | + cta: { |
| 53 | + primary: { |
| 54 | + label: "Download WARP", |
| 55 | + href: "/warp-client/get-started/", |
| 56 | + }, |
| 57 | + secondary: { |
| 58 | + label: "All consumer services", |
| 59 | + href: "/products/?product-group=Consumer+services", |
| 60 | + }, |
| 61 | + }, |
| 62 | + }, |
| 63 | +] as const; |
| 64 | + |
| 65 | +export default function OfferingsTabs() { |
| 66 | + return ( |
| 67 | + <Tabs className="not-content w-full shadow-md"> |
| 68 | + <TabList className="grid list-none grid-cols-3 gap-2 pl-0 text-center"> |
| 69 | + {tabs.map((tab, index) => ( |
| 70 | + <Tab |
| 71 | + key={index} |
| 72 | + className="h-14 rounded-t border-l border-r border-t p-4 font-semibold" |
| 73 | + > |
| 74 | + {tab} |
| 75 | + </Tab> |
| 76 | + ))} |
| 77 | + </TabList> |
| 78 | + |
| 79 | + <TabPanel> |
| 80 | + <div className="flex items-center justify-center gap-6"> |
| 81 | + <div dangerouslySetInnerHTML={{ __html: MapSvg }} /> |
| 82 | + <div> |
| 83 | + <div> |
| 84 | + <p className="text-xl font-semibold">What is Cloudflare?</p> |
| 85 | + <p> |
| 86 | + Connect to or build on top of Cloudflare’s global network to |
| 87 | + speed up and protect your apps, employees, and networks. |
| 88 | + </p> |
| 89 | + </div> |
| 90 | + <div className="flex gap-4"> |
| 91 | + <a href="https://dash.cloudflare.com/login">Sign up</a> |
| 92 | + <a href="/fundamentals/">Learn more</a> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + </TabPanel> |
| 97 | + <TabPanel className="p-6"> |
| 98 | + <div className="flex flex-col gap-4"> |
| 99 | + <p className="text-center text-xl font-semibold"> |
| 100 | + Secure and accelerate anything connected to Cloudflare. |
| 101 | + </p> |
| 102 | + <div className="grid grid-cols-2 gap-4 lg:grid-cols-4"> |
| 103 | + {connectCards.map((card) => ( |
| 104 | + <div className="flex flex-col items-center gap-4 rounded border p-6 shadow-sm"> |
| 105 | + <div className="text-center"> |
| 106 | + <p className="font-semibold">{card.label}</p> |
| 107 | + <p>{card.description}</p> |
| 108 | + </div> |
| 109 | + <a className="mt-auto block min-w-16 text-nowrap rounded border border-cl1-brand-orange px-6"> |
| 110 | + Proxy your domain |
| 111 | + </a> |
| 112 | + <a className="block min-w-16 text-nowrap px-6"> |
| 113 | + All application services |
| 114 | + </a> |
| 115 | + </div> |
| 116 | + ))} |
| 117 | + </div> |
| 118 | + </div> |
| 119 | + </TabPanel> |
| 120 | + <TabPanel> |
| 121 | + <p>Content for Tab 3</p> |
| 122 | + </TabPanel> |
| 123 | + </Tabs> |
| 124 | + ); |
| 125 | +} |
0 commit comments