Compare commits
No commits in common. "086a9791d64f2daf382b7fe60a6075d2ec087271" and "bca94683929989258d6b427d6639427c22eb4be2" have entirely different histories.
086a9791d6
...
bca9468392
3 changed files with 14 additions and 4 deletions
|
@ -14,7 +14,6 @@ Repository: https://www.coastalcommits.com/cswimr/cswimr-gauntlet-plugins
|
|||
id = 'tailwindcss-search-documentation'
|
||||
name = 'Search TailwindCSS Documentation'
|
||||
path = 'src/tailwindcss/src/search-documentation.tsx'
|
||||
icon = 'tailwindcss/list-icon.png'
|
||||
type = 'view'
|
||||
description = """
|
||||
Search TailwindCSS documentation from Gauntlet!
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { List } from "@project-gauntlet/api/components";
|
||||
import React, { ReactElement, useState } from "react";
|
||||
import documentation from "./documentation/tailwind-css";
|
||||
import { Clipboard } from "@project-gauntlet/api/helpers";
|
||||
import open from "../../../utils/open-url";
|
||||
|
||||
// @ts-expect-error gauntlet uses deno and not node
|
||||
|
@ -10,13 +11,24 @@ const denoCore: DenoCore = Deno[Deno.internal].core;
|
|||
export default function SearchDocumentation(): ReactElement {
|
||||
const [searchText, setSearchText] = useState<string | undefined>("");
|
||||
|
||||
//TODO - Migrate this to an Action, so that we can also have a copy to clipboard feature
|
||||
const onClick = async (url: string) => {
|
||||
await open(url);
|
||||
//await Clipboard.writeText(url);
|
||||
};
|
||||
|
||||
return (
|
||||
<List>
|
||||
<List
|
||||
// actions={
|
||||
// <ActionPanel>
|
||||
// <Action
|
||||
// label="Copy URL to Clipboard"
|
||||
// onAction={async () => {
|
||||
// await Clipboard.writeText(item.url);
|
||||
// }}
|
||||
// />
|
||||
// </ActionPanel>
|
||||
// }
|
||||
>
|
||||
<List.SearchBar
|
||||
placeholder={"Search TailwindCSS Documentation..."}
|
||||
value={searchText}
|
||||
|
|
|
@ -22,7 +22,6 @@ const open = async (url: string) => {
|
|||
// Yes, this function uses Deno. Yes, this repository uses Node.js for tooling.
|
||||
// Gauntlet runs loaded plugins in a Deno runtime, so this works fine.
|
||||
// Hop off Copilot I know this isn't using Node.js APIs
|
||||
console.log("Opening URL:", url);
|
||||
const platform = Deno.build.os;
|
||||
const cmd = getOpenCommand(platform);
|
||||
const process = new Deno.Command(cmd, {
|
||||
|
|
Loading…
Add table
Reference in a new issue