Files
cal.diy/packages/app-store/zapier/components/TemplateCard.tsx
T
6ee9de6dd8 Add links to Zapier templates in installed apps (#4982)
* add automation cateogry for n8n and zapier

* fix border radius for seperated apps

* create app specific settings in installed apps

* Fixed design issues caused by app settings

* add first version of template cards with logos

* Add link to zapier template

* Add missing translations

* fix mobile view

* better readable app description in mobile view

* code clean up

* fix issue that lisItem was always expanded

* code clean up

* code clean up

* fix import

* fix typo

* code clean up

* add missing alt to img

* use FiShare2 icon instead of FiZap

* Remove duplicate entries

Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
2022-10-15 08:05:37 +00:00

36 lines
1.2 KiB
TypeScript

import { Button } from "@calcom/ui/v2";
import { Template } from "./AppSettings";
export default function TemplateCard({ template }: { template: Template }) {
return (
<div className="rounded-md border border-gray-200 p-4 ">
<div className="flex items-center justify-center">
<div>
<div className="mr-4 flex h-12 w-12 items-center justify-center rounded-md border p-1 ">
<img className="h-8" alt={template.app} src={`/api/app-store/zapier/${template.icon}`} />
</div>
</div>
<div className="mr-4 ">
<div>
<p className="truncate text-sm font-medium text-neutral-900">{template.app}</p>
<p className="mt-[2px] text-xs text-gray-500 ">{template.text}</p>
</div>
</div>
<div className="ml-auto hidden sm:block">
<Button color="secondary" className="w-[90px] " target="_blank" href={template.link}>
Use Zap
</Button>
</div>
</div>
<div className="mt-2 block w-full sm:hidden">
<div className="float-right">
<Button color="secondary" className="w-[90px]" target="_blank" href={template.link}>
Use Zap
</Button>
</div>
</div>
</div>
);
}