/*
 * SPDX-FileCopyrightText: 2024 Kristóf Marussy
 *
 * SPDX-License-Identifier: MIT
 */

import Link from '@docusaurus/Link';

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

export default function Elsewhere({
  label,
  links,
}: {
  label: React.ReactNode;
  links: {
    href: string;
    icon: React.ReactNode;
  }[];
}) {
  return (
    <div className={styles.elsewhere}>
      <p className={styles.elsewhere__text}>{label}</p>
      <ul className={styles.elsewhere__list}>
        {links.map(({ href, icon }) => (
          <li className={styles.elsewhere__item} key={href}>
            <Link href={href} className={styles.elsewhere__icon}>
              {icon}
            </Link>
          </li>
        ))}
      </ul>
    </div>
  );
}
