feat: link integrations page to webhook

This commit is contained in:
ShubhamPalriwala
2023-08-07 16:29:54 +05:30
parent e8a286bd4e
commit bb4052690e
2 changed files with 7 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ export default function IntegrationsPage({ params }) {
docsHref="https://formbricks.com/docs/getting-started/nextjs-app"
label="Javascript Widget"
description="Integrate Formbricks into your Webapp"
newTab={true}
icon={<Image src={JsLogo} alt="Javascript Logo" />}
/>
<Card
@@ -20,6 +21,7 @@ export default function IntegrationsPage({ params }) {
connectHref="https://zapier.com/apps/formbricks/integrations"
label="Zapier"
description="Integrate Formbricks with 5000+ apps via Zapier"
newTab={true}
icon={<Image src={ZapierLogo} alt="Zapier Logo" />}
/>
<Card
@@ -27,6 +29,7 @@ export default function IntegrationsPage({ params }) {
docsHref="https://formbricks.com/docs/webhook-api/overview"
label="Custom Webhook"
description="Trigger Webhooks based on actions in your surveys"
newTab={false}
icon={<Image src={JsLogo} alt="Javascript Logo" />}
/>
</div>

View File

@@ -6,23 +6,24 @@ interface CardProps {
label: string;
description: string;
icon?: React.ReactNode;
newTab?: boolean;
}
export type { CardProps };
export const Card: React.FC<CardProps> = ({ connectHref, docsHref, label, description, icon }) => (
export const Card: React.FC<CardProps> = ({ connectHref, docsHref, label, description, icon, newTab }) => (
<div className="rounded-lg bg-white p-8 text-left shadow-sm ">
{icon && <div className="mb-6 h-8 w-8">{icon}</div>}
<h3 className="text-lg font-bold text-slate-800">{label}</h3>
<p className="text-xs text-slate-500">{description}</p>
<div className="mt-4 flex space-x-2">
{connectHref && (
<Button href={connectHref} target="_blank" size="sm" variant="darkCTA">
<Button href={connectHref} target={newTab ? "_blank" : "_self"} size="sm" variant="darkCTA">
Connect
</Button>
)}
{docsHref && (
<Button href={docsHref} target="_blank" size="sm" variant="secondary">
<Button href={docsHref} target={newTab ? "_blank" : "_self"} size="sm" variant="secondary">
Docs
</Button>
)}