forked from asteroidai/web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract MeetingButton component
- Create reusable MeetingButton component - Add size and text props for customization - Update Nav and Pricing to use MeetingButton - Adjust button styles and icon size in MeetingButton
- Loading branch information
Showing
4 changed files
with
46 additions
and
52 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
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,35 @@ | ||
import * as React from "react" | ||
import { cn } from "@/lib/utils" | ||
import { Button } from "@/components/ui/button" | ||
import { ArrowRight } from "lucide-react" | ||
import { Link } from "react-router-dom" | ||
|
||
type MeetingButtonProps = { | ||
size?: "sm" | "lg" | ||
text?: string | ||
} | ||
|
||
export default function MeetingButton({ size = "sm", text = "Book a demo" }: MeetingButtonProps) { | ||
return ( | ||
<Link to="https://calendly.com/founders-asteroid-hhaf/30min"> | ||
<Button | ||
size={size} | ||
className={cn( | ||
"relative group", | ||
"before:absolute before:inset-0 before:rounded-md before:bg-gradient-to-r before:from-indigo-500 before:to-purple-500", | ||
"before:opacity-100", | ||
"text-white", | ||
"transition-all duration-300", | ||
"hover:scale-105 active:scale-95", | ||
"shadow-lg shadow-indigo-500/25", | ||
"overflow-hidden" | ||
)} | ||
> | ||
<span className="relative z-10 flex items-center font-semibold tracking-wide"> | ||
{text} | ||
<ArrowRight className="ml-2 group-hover:translate-x-1 transition-transform duration-300" size={16} /> | ||
</span> | ||
</Button> | ||
</Link> | ||
) | ||
} |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ import { Button } from "@/components/ui/button" | |
import { Card, CardContent, CardDescription, CardHeader, CardTitle, CardFooter } from "@/components/ui/card" | ||
import Page from './components/Page' | ||
import { Link } from 'react-router-dom' | ||
import MeetingButton from './MeetingButton' | ||
const pricingPlans = [ | ||
{ | ||
name: "Developer", | ||
|
@@ -36,7 +37,7 @@ const pricingPlans = [ | |
"Automated prompt optimization", | ||
"Dedicated Slack support channel", | ||
], | ||
buttonText: "Contact Sales", | ||
buttonText: "Contact Us", | ||
buttonVariant: "primary", | ||
buttonHref: "mailto:[email protected]", | ||
highlighted: true, | ||
|
@@ -54,7 +55,7 @@ const pricingPlans = [ | |
"Self-hosted deployment options", | ||
"Dedicated support engineer with SLA", | ||
], | ||
buttonText: "Contact Sales", | ||
buttonText: "Contact Us", | ||
buttonVariant: "outline", | ||
buttonHref: "mailto:[email protected]", | ||
highlighted: false, | ||
|
@@ -108,16 +109,10 @@ export default function PricingPage() { | |
</CardContent> | ||
<CardFooter className="flex justify-end"> | ||
<Link to={plan.buttonHref}> | ||
<Button | ||
className={`w-full transition-all duration-300 | ||
${plan.highlighted | ||
? 'bg-primary text-primary-foreground hover:bg-primary/90 hover:scale-105' | ||
: 'transition-colors' | ||
}`} | ||
variant={plan.buttonVariant as any} | ||
> | ||
{plan.buttonText} | ||
</Button> | ||
<MeetingButton | ||
size="lg" | ||
text={plan.buttonText} | ||
/> | ||
</Link> | ||
</CardFooter> | ||
</Card> | ||
|