add icon, use clipboard instead of open
All checks were successful
Actions / Build Plugins (pull_request) Successful in 38s

the clipboard change is a temporary fix for https://github.com/project-gauntlet/gauntlet/issues/28
This commit is contained in:
cswimr 2024-12-23 17:44:11 -05:00
parent d8f2e05a42
commit 91e5669667
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
3 changed files with 6 additions and 5 deletions

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

View file

@ -1,12 +1,13 @@
import { List } from "@project-gauntlet/api/components";
import React, { ReactElement } from "react";
import documentation from "./documentation/tailwind-css";
//import { Clipboard } from "@project-gauntlet/api/helpers";
import { open } from "@opensrc/deno-open";
import { Clipboard } from "@project-gauntlet/api/helpers";
//import { open } from "@opensrc/deno-open"; # pending a fix for https://github.com/project-gauntlet/gauntlet/issues/28
export default function SearchDocumentation(): ReactElement {
const onClick = async (url: string) => {
await open(url);
//await open(url);
await Clipboard.writeText(url);
};
return (
@ -26,8 +27,8 @@ export default function SearchDocumentation(): ReactElement {
<List.Section key={section} title={section}>
{items.map((item) => (
<List.Item
key={item.url}
//icon="tailwind-icon.png"
key={item.title}
icon={{ asset: "tailwindcss/list-icon.png" }}
title={item.title}
onClick={() => onClick(item.url)}
/>