import classNames from "classnames"; import { StyleColorVariants, StyleColorVariantsMap } from "core/_variants"; import React from "react"; type Props = { className?: string | undefined; children: string; fontSize?: number; variant?: StyleColorVariants | undefined; }; const hexagonStyles: StyleColorVariantsMap = { gray: "fill-gray-500", pink: "fill-pink-500", blue: "fill-blue-500", purple: "fill-purple-500", red: "fill-red-500", yellow: "fill-yellow-600", emerald: "fill-emerald-500", sky: "fill-sky-500", "dark-coral": "fill-dark-coral-500" }; /** * Hexagon sign * @param {string} children Characters to exclude from svg figure * @param {string|undefined} className Classes used to customize svg element * @param {number} fontSize Font size for excluding characters * @return {JSX.Element} */ export default function Hexagon({ className, children, fontSize = 24, variant = "blue", }: Props): JSX.Element { const classes = hexagonStyles[variant]; return ( {fontSize && ( {children} )} ); }