Inline view examples

This commit is contained in:
Exidex 2025-01-28 21:44:05 +01:00
parent 90957f214a
commit d721bda736
No known key found for this signature in database
GPG key ID: AC63AA86DD4F2D45
50 changed files with 459 additions and 25 deletions

View file

@ -1,20 +1,17 @@
import { Action, ActionPanel, Element, Icons, List } from "@project-gauntlet/api/components";
import React, { ReactElement, ReactNode, useRef, useState } from "react";
import React, { ReactElement, ReactNode, useRef } from "react";
import { useCachedPromise, useFetch, useNavigation, usePromise } from "@project-gauntlet/api/hooks";
export default function ListView(): ReactElement {
const { pushView } = useNavigation();
const [id, setId] = useState<string | undefined>(undefined);
return (
<List
actions={
<ActionPanel>
<Action label="Run hook" onAction={() => pushPrimaryAction(id, pushView)}/>
<Action label="Run hook" onAction={(id) => pushPrimaryAction(id, pushView)}/>
</ActionPanel>
}
onItemFocusChange={itemId => setId(itemId)}
>
<List.Item id="UsePromiseTestBasic" title="UsePromiseTestBasic"/>
<List.Item id="UsePromiseTestExecuteFalse" title="UsePromiseTestExecuteFalse"/>