Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

1.7 KB
Raw Blame
import Link from '@docusaurus/Link';
import clsx from 'clsx';
import React from 'react';

import styles from './ThreeCardsWithIcon.module.css';

export default function ThreeCardsWithIcon({ cards }) {
    return (
        <div className={styles.cardsWrapper}>
            {cards?.map((card, index) => {
                const content = (
                    <>
                        <div className={styles.cardIcon}>{card.icon}</div>
                        <h3 className={styles.cardTitle}>{card.title}</h3>
                        <p className={styles.cardDescription}>
                            {card.description}
                        </p>
                        {card.actionLink && (
                            <Link
                                to={card.actionLink.href}
                                className={styles.cardAction}
                            >
                                {card.actionLink.text}
                            </Link>
                        )}
                    </>
                );

                if (card.to) {
                    return (
                        <Link
                            className={clsx(
                                styles.cardItem,
                                styles.cardItemLink,
                            )}
                            to={card.to}
                            key={index}
                        >
                            {content}
                        </Link>
                    );
                }

                return (
                    <div className={styles.cardItem} key={index}>
                        {content}
                    </div>
                );
            })}
        </div>
    );
}