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