diff --git a/components/Shared/IIIF/Share.tsx b/components/Shared/IIIF/Share.tsx index a4988ce6..e9baee13 100644 --- a/components/Shared/IIIF/Share.tsx +++ b/components/Shared/IIIF/Share.tsx @@ -1,10 +1,11 @@ import * as Dropdown from "@radix-ui/react-dropdown-menu"; -import { IconArrowForward, IconChevronDown } from "../SVG/Icons"; +import Icon, { IconStyled } from "../Icon"; +import { IconChevronDown, IconExternalLink } from "../SVG/Icons"; import CopyText from "../CopyText"; import IIIFLogo from "../SVG/IIIF"; -import Icon from "../Icon"; +import { color } from "framer-motion"; import { styled } from "@/stitches.config"; const IIIFShare = ({ uri }: { uri: string }) => { @@ -35,24 +36,6 @@ const IIIFShare = ({ uri }: { uri: string }) => { View in Clover IIIF - - - View in Mirador - - - - - View in Theseus - - View Raw JSON @@ -66,8 +49,22 @@ const IIIFShare = ({ uri }: { uri: string }) => { href="https://iiif.io/get-started/why-iiif/" target="_blank" rel="noreferrer" + data-id="what-is-iiif" > What is IIIF? + + + @@ -84,7 +81,7 @@ const StyledIIIFShare = styled("div", { backgroundColor: "transparent", color: "$black50", fontFamily: "$northwesternSansRegular", - fontSize: "$gr2", + fontSize: "$gr3", borderRadius: "38px", border: "none", display: "flex", @@ -98,6 +95,9 @@ const StyledIIIFShare = styled("div", { "> span": { svg: { padding: "7px", + path: { + fill: "$purple !important", + }, }, "&:last-child": { @@ -133,17 +133,32 @@ const StyledIIIFShareContent = styled(Dropdown.Content, { boxShadow: "5px 5px 19px 0 #0002", display: "flex", flexDirection: "column", - gap: "$gr1", - lineHeight: "1.25em", - fontSize: "$gr2 !important", + fontSize: "$gr2 ", fontFamily: "$northwesternSansRegular", - minWidth: "200px", + minWidth: "160px", + gap: "$gr2", a: { textDecoration: "underline", textDecorationThickness: "min(2px,max(1px,.05em))", textUnderlineOffset: "calc(.05em + 2px)", textDecorationColor: "$purple10", + color: "$black50", + + "&[data-id='what-is-iiif']": { + display: "flex", + + [`${IconStyled}`]: { + marginTop: "-3px", + }, + }, + + "&:hover, &:active": { + svg: { + color: "$purple", + fill: "$purple", + }, + }, }, button: { @@ -156,6 +171,12 @@ const StyledIIIFShareContent = styled(Dropdown.Content, { textDecorationThickness: "min(2px,max(1px,.05em))", textUnderlineOffset: "calc(.05em + 2px)", textDecorationColor: "$purple10", + color: "$black50", + + "&:hover": { + color: "$purple", + fill: "$purple", + }, }, }); diff --git a/components/Shared/Icon.tsx b/components/Shared/Icon.tsx index fbd94278..794f8a61 100644 --- a/components/Shared/Icon.tsx +++ b/components/Shared/Icon.tsx @@ -1,12 +1,23 @@ +import { CSS } from "@stitches/react"; import { ReactNode } from "react"; import { styled } from "@/stitches.config"; interface IconProps { children: ReactNode; + style?: CSS; + hasSVGPadding?: boolean; } -const Icon: React.FC = ({ children }) => { - return {children}; +const Icon: React.FC = ({ + children, + style, + hasSVGPadding = true, +}) => { + return ( + + {children} + + ); }; /* eslint sort-keys: 0 */ @@ -32,7 +43,21 @@ export const IconStyled = styled("span", { color: "inherit", fill: "inherit", stroke: "inherit", - padding: "8px", + }, + + variants: { + hasSVGPadding: { + true: { + svg: { + padding: "0.5em", + }, + }, + false: { + svg: { + padding: "0", + }, + }, + }, }, }); diff --git a/components/Shared/SVG/Icons.tsx b/components/Shared/SVG/Icons.tsx index 7e5344b6..0df72d2e 100644 --- a/components/Shared/SVG/Icons.tsx +++ b/components/Shared/SVG/Icons.tsx @@ -79,6 +79,13 @@ const IconClear: React.FC = () => ( ); +const IconExternalLink: React.FC = () => ( + + + + +); + const IconFilter: React.FC = () => ( Filter @@ -228,6 +235,7 @@ export { IconCheck, IconChevronDown, IconClear, + IconExternalLink, IconFilter, IconImage, IconInfo,