import {IconProp} from "@fortawesome/fontawesome-svg-core" import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" import {default as Link} from "next/link" import {default as cn} from "classnames" import {default as style} from "./LinkPanel.module.css" import React from "react" export type LinkPanelProps = { href?: string, icon: IconProp, text: React.ReactNode, description?: React.ReactNode, extraTop?: React.ReactNode, extraBtm?: React.ReactNode, me?: boolean, fade?: boolean, onPress?: React.EventHandler> } export const LinkPanel = ({href, icon, text, description, extraTop, extraBtm, me, fade, onPress}: LinkPanelProps) => { const panel = ( <> {text} {extraTop && {extraTop} } {description && {description} } {extraBtm !== undefined && {extraBtm} } ) if(href) { return ( {panel} ) } else { return (
{panel}
) } }