add icon, use clipboard instead of open
All checks were successful
Actions / Build Plugins (pull_request) Successful in 38s
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:
parent
d8f2e05a42
commit
91e5669667
3 changed files with 6 additions and 5 deletions
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
assets/tailwindcss/list-icon.png
Normal file
BIN
assets/tailwindcss/list-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 983 B |
|
@ -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)}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue