-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
305d8c5
commit 4eb82d9
Showing
4 changed files
with
105 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,75 @@ | ||
const IIIFShare = ({ uri }) => { | ||
return <>resource: {uri}</>; | ||
import * as Dropdown from "@radix-ui/react-dropdown-menu"; | ||
|
||
import CopyText from "../CopyText"; | ||
import IIIFLogo from "../SVG/IIIF"; | ||
import Icon from "../Icon"; | ||
import { IconArrowForward } from "../SVG/Icons"; | ||
import { styled } from "@/stitches.config"; | ||
|
||
const IIIFShare = ({ uri }: { uri: string }) => { | ||
return ( | ||
<StyledIIIFShare> | ||
<Dropdown.Root> | ||
<Dropdown.Trigger> | ||
<Icon> | ||
<IIIFLogo /> | ||
</Icon> | ||
View as IIIF | ||
<Icon> | ||
<IconArrowForward /> | ||
</Icon> | ||
</Dropdown.Trigger> | ||
<Dropdown.Content> | ||
<Dropdown.Item> | ||
<CopyText textPrompt="Copy IIIF" textToCopy={uri} /> | ||
</Dropdown.Item> | ||
<Dropdown.Item> | ||
<a href={uri} target="_blank" rel="noreferrer"> | ||
View IIIF JSON | ||
</a> | ||
</Dropdown.Item> | ||
<Dropdown.Item> | ||
<a | ||
href="https://iiif.io/get-started/why-iiif/" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
What is IIIF? | ||
</a> | ||
</Dropdown.Item> | ||
</Dropdown.Content> | ||
</Dropdown.Root> | ||
</StyledIIIFShare> | ||
); | ||
}; | ||
|
||
const StyledIIIFShare = styled("div", { | ||
position: "relative", | ||
zIndex: 1, | ||
|
||
"> button": { | ||
backgroundColor: "$gray6", | ||
color: "$black50", | ||
fill: "$black50", | ||
fontFamily: "$northwesternSansRegular", | ||
fontSize: "$gr2", | ||
borderRadius: "38px", | ||
border: "none", | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "space-between", | ||
cursor: "pointer", | ||
|
||
"&:hover, &:active ": { | ||
color: "$black", | ||
fill: "$black", | ||
backgroundColor: "$black10", | ||
}, | ||
}, | ||
|
||
[`${Dropdown.Content}`]: { | ||
backgroundColor: "$white", | ||
}, | ||
}); | ||
|
||
export default IIIFShare; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters