-
Notifications
You must be signed in to change notification settings - Fork 1.1k
improvement: enterprise card #1046
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
Changes from all commits
df74d08
206ed0d
c33949e
897fcc0
617ec79
1953805
203904a
da243dd
b4297f4
6544ec2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| import { Fit, Layout, useRive } from "@rive-app/react-canvas"; | ||
| import clsx from "clsx"; | ||
| import { forwardRef, memo, useImperativeHandle } from "react"; | ||
|
|
||
| export interface EnterpriseArtRef { | ||
| playHoverAnimation: () => void; | ||
| playDefaultAnimation: () => void; | ||
| } | ||
|
|
||
| interface EnterpriseArtProps { | ||
| className?: string; | ||
| } | ||
|
|
||
| export const EnterpriseArt = memo( | ||
| forwardRef<EnterpriseArtRef, EnterpriseArtProps>(({ className }, ref) => { | ||
| const { rive, RiveComponent: EnterpriseRive } = useRive({ | ||
| src: "/rive/pricing.riv", | ||
| artboard: "enterprise", | ||
| animations: "idle", | ||
| autoplay: false, | ||
| layout: new Layout({ | ||
| fit: Fit.Contain, | ||
| }), | ||
| }); | ||
|
|
||
| useImperativeHandle(ref, () => ({ | ||
| playHoverAnimation: () => { | ||
| if (rive) { | ||
| rive.play("out"); | ||
| } | ||
| }, | ||
| playDefaultAnimation: () => { | ||
| if (rive) { | ||
| rive.play("idle"); | ||
| } | ||
| }, | ||
| })); | ||
|
|
||
| return ( | ||
| <EnterpriseRive | ||
| className={clsx(className, "mx-auto w-full max-w-[200px] h-[120px]")} | ||
| /> | ||
| ); | ||
| }), | ||
| ); |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,109 @@ | ||||||||||||||||||||||||
| import { Button } from "@cap/ui"; | ||||||||||||||||||||||||
| import { | ||||||||||||||||||||||||
| faDownload, | ||||||||||||||||||||||||
| faHandshake, | ||||||||||||||||||||||||
| faServer, | ||||||||||||||||||||||||
| faShield, | ||||||||||||||||||||||||
| faUsers, | ||||||||||||||||||||||||
| } from "@fortawesome/free-solid-svg-icons"; | ||||||||||||||||||||||||
| import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||||||||||||||||||||||||
| import { useRef } from "react"; | ||||||||||||||||||||||||
| import { EnterpriseArt, type EnterpriseArtRef } from "./EnterpriseArt"; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| export const EnterpriseCard = () => { | ||||||||||||||||||||||||
| const enterpriseArtRef = useRef<EnterpriseArtRef>(null); | ||||||||||||||||||||||||
| // Enterprise features data | ||||||||||||||||||||||||
| const enterpriseFeatures = [ | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| icon: faShield, | ||||||||||||||||||||||||
| label: "SLAs & Priority Support", | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| icon: faDownload, | ||||||||||||||||||||||||
| label: "Loom Video Importer", | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| icon: faHandshake, | ||||||||||||||||||||||||
| label: "Bulk Discounts", | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| icon: faServer, | ||||||||||||||||||||||||
| label: "Managed self-hosting", | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| icon: faUsers, | ||||||||||||||||||||||||
| label: "SAML SSO Login", | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| icon: faShield, | ||||||||||||||||||||||||
| label: "Advanced Security Controls", | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| const handleBookCall = () => { | ||||||||||||||||||||||||
| window.open("https://cal.com/cap.so/15min", "_blank"); | ||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||
|
Comment on lines
+43
to
+45
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Harden new‑tab open against tabnabbing Use noopener/noreferrer (or clear opener) when opening external sites. - const handleBookCall = () => {
- window.open("https://cal.com/cap.so/15min", "_blank");
- };
+ const handleBookCall = () => {
+ const w = window.open(
+ "https://cal.com/cap.so/15min",
+ "_blank",
+ "noopener,noreferrer",
+ );
+ if (w) w.opener = null;
+ };📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||
| <div | ||||||||||||||||||||||||
| onMouseEnter={() => { | ||||||||||||||||||||||||
| enterpriseArtRef.current?.playHoverAnimation(); | ||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||
| onMouseLeave={() => { | ||||||||||||||||||||||||
| enterpriseArtRef.current?.playDefaultAnimation(); | ||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||
| className="flex overflow-hidden relative flex-col flex-1 justify-between p-8 text-black rounded-2xl border shadow-lg bg-gray-1 border-gray-5" | ||||||||||||||||||||||||
| > | ||||||||||||||||||||||||
| <div className="flex relative z-10 flex-col flex-1 justify-between space-y-8 h-full"> | ||||||||||||||||||||||||
| <div> | ||||||||||||||||||||||||
| <div className="space-y-5 min-h-fit"> | ||||||||||||||||||||||||
| <EnterpriseArt ref={enterpriseArtRef} /> | ||||||||||||||||||||||||
| <div> | ||||||||||||||||||||||||
| <h3 className="mb-2 text-xl font-semibold text-center text-gray-12"> | ||||||||||||||||||||||||
| Cap for Enterprise | ||||||||||||||||||||||||
| </h3> | ||||||||||||||||||||||||
| <p className="mb-4 text-sm font-medium text-center text-gray-11"> | ||||||||||||||||||||||||
| Deploy Cap across your organization with enterprise-grade | ||||||||||||||||||||||||
| features, dedicated support, and custom integrations. | ||||||||||||||||||||||||
| </p> | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| <div className="flex flex-wrap items-center p-3 w-full rounded-full border bg-gray-3 border-gray-4"> | ||||||||||||||||||||||||
| <p className="w-full text-lg font-medium text-center text-black"> | ||||||||||||||||||||||||
| Contact us for a quote | ||||||||||||||||||||||||
| </p> | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| <div className="space-y-6"> | ||||||||||||||||||||||||
| <ul className="space-y-3"> | ||||||||||||||||||||||||
| {enterpriseFeatures.map((feature) => ( | ||||||||||||||||||||||||
| <li | ||||||||||||||||||||||||
| key={feature.label} | ||||||||||||||||||||||||
| className="flex items-center text-sm text-gray-12" | ||||||||||||||||||||||||
| > | ||||||||||||||||||||||||
| <FontAwesomeIcon | ||||||||||||||||||||||||
| icon={feature.icon} | ||||||||||||||||||||||||
| className="flex-shrink-0 mr-3 text-gray-10" | ||||||||||||||||||||||||
| style={{ fontSize: "14px", minWidth: "14px" }} | ||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||
| <span className="text-gray-11">{feature.label}</span> | ||||||||||||||||||||||||
| </li> | ||||||||||||||||||||||||
| ))} | ||||||||||||||||||||||||
| </ul> | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||
| variant="gray" | ||||||||||||||||||||||||
| size="lg" | ||||||||||||||||||||||||
| onClick={handleBookCall} | ||||||||||||||||||||||||
| className="w-full font-medium" | ||||||||||||||||||||||||
| aria-label="Book a Call for Enterprise" | ||||||||||||||||||||||||
| > | ||||||||||||||||||||||||
| Book a Call | ||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||
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.
Remove inline comment (repo rule: no comments in code)
Inline comments are disallowed per repo guidelines.
- // Enterprise features data const enterpriseFeatures = [📝 Committable suggestion
🤖 Prompt for AI Agents