8000 docs(actions & blinks): Add type field to LinkedAction type by davidkamura · Pull Request #406 · solana-foundation/solana-com · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

docs(actions & blinks): Add type field to LinkedAction type #406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions content/guides/advanced/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,21 @@ export interface Action<T extends ActionType> {
and input fields based on the items listed in the `links.actions` field. The
client should not render a button for the contents of the root `label`.

```ts title="LinkedActionType"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the explicit type here. Listing type: LinkedActionType; in LinkedAction is sufficient.

/**
* Type of action to determine client side handling
*/
export type LinkedActionType =
| "transaction"
| "message"
| "post"
| "external-link";
```

```ts title="LinkedAction"
export interface LinkedAction {
/** Type of action to be performed by user */
type: LinkedActionType;
/** URL endpoint for an action */
href: string;
/** button text rendered to the user */
Expand Down
0