Files
misode.github.io/src/app/components/ToolGroup.tsx
Misode f71e44f91b Add Tailwind CSS (#425)
* Install and configure tailwind

* Fix style issues
2023-10-02 23:38:18 +02:00

23 lines
643 B
TypeScript

import type { ComponentChildren } from 'preact'
import type { Icons } from './Icons.jsx'
import type { Octicon } from './Octicon.jsx'
import { ToolCard } from './ToolCard.jsx'
interface Props {
title: string,
titleIcon?: keyof typeof Octicon | keyof typeof Icons,
link?: string,
children?: ComponentChildren,
}
export function ToolGroup({ title, titleIcon, link, children }: Props) {
return <div class="tool-group">
{link === undefined
? <div class="tool-card"><h3 class="text-[1.17em]">{title}</h3></div>
: <ToolCard {...{ title, titleIcon, link}} />
}
{children && <div class="tool-body">
{children}
</div>}
</div>
}