hookshot/web/components/ConnectionCard.tsx
Andrew Ferrazzutti e9613225be
Add GitHub widget (#420)
* Add GitHub widget

Also make assorted fixes to help push this along

* Remove unused import

* Resolve new linter warnings

* Undo testing-only change

Didn't mean to commit this

* Use "org/repo" as GitHub repo names in widget

* Update src/ConnectionManager.ts

Co-authored-by: Will Hunt <will@half-shot.uk>

* Don't use null assertions

* Use block scope in switch cases

* Fix some BridgeAPI imports

* Actually validate connection state

* Return only GitHub repos with admin permissions

Co-authored-by: Will Hunt <will@half-shot.uk>
2022-07-29 10:05:21 -04:00

20 lines
491 B
TypeScript

import { h } from "preact";
import style from "./ConnectionCard.module.scss";
interface IProps {
imageSrc: string;
serviceName: string;
description: string;
key: string;
onClick: () => void;
}
export function ConnectionCard(props: IProps) {
return <div className={style.card} onClick={props.onClick}>
<img src={props.imageSrc} />
<div>
<span>{props.serviceName}</span>
<p>{props.description}</p>
</div>
</div>;
}