Skip to content

Commit

Permalink
type: button for open wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancheng-myshell committed Jan 17, 2025
1 parent 8a99ed3 commit f42325c
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions web/packages/pro-config-type/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type Button = {
content: string | Expression;
/** Tooltip when hovering button */
description?: string | Expression;
// TODO(@Boyn): visbile
// TODO: visbile
// TODO: disabled
on_click:
| CustomEventName
Expand All @@ -18,8 +18,8 @@ export type Button = {
payload?: {
[key: CustomKey]: Value;
};
}
| Action;
action?: Action; // TODO
};
// TODO: CSSProperties?
style?: {
/* Button font color appearance. Represent it with hex string */
Expand Down Expand Up @@ -50,21 +50,28 @@ export type RenderConfig = {
};

type Action =
| {
event: 'COPY';
payload: {
content: string;
};
}
| {
event: 'DOWNLOAD';
payload: {
url: URLString;
};
}
| {
event: 'OPEN';
payload: {
url: string;
};
// | {
// action: 'COPY';
// payload: {
// content: string;
// };
// }
// | {
// action: 'DOWNLOAD';
// payload: {
// url: URLString;
// };
// }
// | {
// action: 'OPEN';
// payload: {
// url: string;
// };
// }
{
type: 'OPEN_WALLET';
payload: {
// TODO: 应该有很多
transaction_hash: string;
};
};

0 comments on commit f42325c

Please sign in to comment.