Files
calendar/apps/web/components/integrations/IntegrationListItem.tsx
T
Hariom BalharaGitHubkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
c3fbf8224b Feature: Routing Forms Typeform App and other improvements (#3625)
* Add Embed ModalBox for routing forms

* Add duplicate form support

* Fix duplication logic

* Change to feathericons everywhere and other fixes

* Dont allow routes for fallback route

* Fix all TS issues

* Fix tests

* Support routing using query params

* Support multiselect in router endpoint

* Fix the issue where app goes in embed mode after viewing embed once

* Add router url tests

* Add Responses download and form toggling tests

* Add required validation test

* Change Icons everywhere

* App typeform app

* Improvements in cli

* Add typeform how-to-use page

* Add typeform how-to-use page and screenshots

* Fix TS error

* Add missing image

* Update CliApp.tsx

* Revert unexpected zapier change

* Revert yarn.lock, not sure why it was modified

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-13 11:04:57 +00:00

40 lines
1.3 KiB
TypeScript

import Link from "next/link";
import { ReactNode } from "react";
import { ListItem, ListItemText, ListItemTitle } from "@calcom/ui/List";
import classNames from "@lib/classNames";
function IntegrationListItem(props: {
imageSrc?: string;
slug: string;
name?: string;
title?: string;
description: string;
actions?: ReactNode;
children?: ReactNode;
logo: string;
}): JSX.Element {
const title = props.name || props.title;
return (
<ListItem expanded={!!props.children} className={classNames("flex-col")}>
<div className={classNames("flex w-full flex-1 items-center space-x-2 p-3 rtl:space-x-reverse")}>
{
// eslint-disable-next-line @next/next/no-img-element
props.logo && <img className="h-10 w-10" src={props.logo} alt={title} />
}
<div className="flex-grow truncate pl-2">
<ListItemTitle component="h3">
<Link href={"/apps/" + props.slug}>{props.name || title}</Link>
</ListItemTitle>
<ListItemText component="p">{props.description}</ListItemText>
</div>
<div>{props.actions}</div>
</div>
{props.children && <div className="w-full border-t border-gray-200">{props.children}</div>}
</ListItem>
);
}
export default IntegrationListItem;