import React from "react"; import { Button } from "components/Button/Button"; import Typography from "components/typography/Typography"; import { SVGArrowDown, SVGArrowUp, SVGCite, SVGFiletext, SVGDownload, SVGShare, SVGFolder, } from "components/icons"; import classNames from "classnames"; import { Transition } from "@headlessui/react"; import Link from "components/typography/Link"; const interactionButtonsStore = [ { icon: , title: "Read file", buttonEmphasis: "high", iconClassName: "h-6 fill-white stroke-white", }, { icon: , title: "Download", buttonEmphasis: "low", iconClassName: "w-6 fill-gray-900 stroke-gray-900", }, { icon: , title: "Cite", buttonEmphasis: "low", iconClassName: "w-6 fill-gray-900 stroke-gray-900", }, { icon: , title: "Share", buttonEmphasis: "low", iconClassName: "w-6 fill-gray-900 stroke-gray-900", }, ]; type ArticleButtonProps = { isAbstractOpen?: boolean; openAbstract?: () => void; children?: React.ReactNode; className?: string; emphasis?: "high" | "low"; articleID?: string, } & Omit, "">; export function ArticleInteractionButtons({ isAbstractOpen = false, children, openAbstract = () => { }, className, articleID, emphasis = "high", //to change displaying of component ...props }: ArticleButtonProps) { const abstractButton = ( ); const fileInteractionButtons = interactionButtonsStore.map((button) => { return ( button.title === 'Read file' ? : ); }); return (
{emphasis === "low" && !children ? abstractButton : null} {children ? children : fileInteractionButtons}
); } ArticleInteractionButtons.displayName = "ArticleInteractionButtons";