import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; import ThemedImage from '@theme/ThemedImage'; /** * Created by David Garcia for Finboot. * * Custom Card component for Docusaurus. */ import clsx from 'clsx'; import React from 'react'; import { CardProps } from '../types'; import styles from './styles.module.css'; export default function Card(props:CardProps) { const { title, content, link, target, buttonText, iconLight, iconDark, className, style, } = props; const sources = { light: useBaseUrl(iconLight), dark: useBaseUrl(iconDark), }; let ctaButton, themedImage; if (iconLight && iconDark) { themedImage = ( ); } if (buttonText) { ctaButton = ( ) } let targetAttr = target; if (!targetAttr) { targetAttr = "_self"; } return ( // @ts-ignore style always exists
{themedImage}

{title}

{content}

{ctaButton}
); };