From ff3e506d26247501ddbeac7a45125399e61fd45b Mon Sep 17 00:00:00 2001 From: leif Date: Sun, 8 Dec 2024 11:44:24 +0800 Subject: [PATCH] update documentation for svelte state accessors --- .../pages/svelte/getting-started/state.tsx | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/apps/playground/src/pages/svelte/getting-started/state.tsx b/apps/playground/src/pages/svelte/getting-started/state.tsx index 3f456d61c..3fd6b012b 100644 --- a/apps/playground/src/pages/svelte/getting-started/state.tsx +++ b/apps/playground/src/pages/svelte/getting-started/state.tsx @@ -18,16 +18,16 @@ function Left() { let code = ``; code += ``; return ( <>

- Provide information on the current wallet's state, and functions for - connecting and disconnecting user wallet. + Obtain information on the current wallet's state, all fields on the{" "} + BrowserWalletState JavaScript object are Svelte 5 runes, + meaning when using the accessor, these values are reactive.

+

wallet is a{" "} @@ -46,15 +46,6 @@ function Left() { connecting, a boolean, true if the wallet is connecting and initializing.

-

- connect(walletName: string), a function, provide the wallet - name to connect wallet. Retrive a list of available wallets with{" "} - useWalletList(). -

-

- disconnect(), a function, to disconnect the connected - wallet. -

); } @@ -64,19 +55,19 @@ function Right() { example += `\n`; example += `\n`; - example += `
\n`; + example += `
\n`; example += ` \n`; - example += ` \n`; example += `
\n`; return ( @@ -87,4 +78,4 @@ function Right() { childrenAfterCodeFunctions={true} > ); -} \ No newline at end of file +}