feat: Update UI

This commit is contained in:
Prad Nukala 2025-01-07 12:05:19 -05:00
parent ef17abbe95
commit 2efea5aacd
6 changed files with 89 additions and 12 deletions

View File

@ -0,0 +1,37 @@
package input
templ AccountSelect() {
<sl-select
label="Accounts"
name="selected_assets"
value="SNR BTC ETH"
help-text="Select Blockchains to connect with your Vault"
multiple
class="custom-tag py-2"
>
<sl-option value="SNR">
<sl-icon slot="prefix" name="SNR" library="crypto"></sl-icon>
Sonr
</sl-option>
<sl-option value="BTC">
<sl-icon slot="prefix" name="BTC" library="crypto"></sl-icon>
Bitcoin
</sl-option>
<sl-option value="ETH">
<sl-icon slot="prefix" name="ETH" library="crypto"></sl-icon>
Ethereum
</sl-option>
<sl-option value="SOL">
<sl-icon slot="prefix" name="SOL" library="crypto"></sl-icon>
Solana
</sl-option>
<sl-option value="LTC">
<sl-icon slot="prefix" name="LTC" library="crypto"></sl-icon>
Litecoin
</sl-option>
<sl-option value="DOGE">
<sl-icon slot="prefix" name="DOGE" library="crypto"></sl-icon>
Dogecoin
</sl-option>
</sl-select>
}

View File

@ -0,0 +1,40 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.819
package input
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
func AccountSelect() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<sl-select label=\"Accounts\" name=\"selected_assets\" value=\"SNR BTC ETH\" help-text=\"Select Blockchains to connect with your Vault\" multiple class=\"custom-tag py-2\"><sl-option value=\"SNR\"><sl-icon slot=\"prefix\" name=\"SNR\" library=\"crypto\"></sl-icon> Sonr</sl-option> <sl-option value=\"BTC\"><sl-icon slot=\"prefix\" name=\"BTC\" library=\"crypto\"></sl-icon> Bitcoin</sl-option> <sl-option value=\"ETH\"><sl-icon slot=\"prefix\" name=\"ETH\" library=\"crypto\"></sl-icon> Ethereum</sl-option> <sl-option value=\"SOL\"><sl-icon slot=\"prefix\" name=\"SOL\" library=\"crypto\"></sl-icon> Solana</sl-option> <sl-option value=\"LTC\"><sl-icon slot=\"prefix\" name=\"LTC\" library=\"crypto\"></sl-icon> Litecoin</sl-option> <sl-option value=\"DOGE\"><sl-icon slot=\"prefix\" name=\"DOGE\" library=\"crypto\"></sl-icon> Dogecoin</sl-option></sl-select>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return nil
})
}
var _ = templruntime.GeneratedTemplate

View File

@ -1,4 +1,4 @@
package islands
package input
type Coin struct {
Ticker string
@ -23,7 +23,7 @@ var defaultCoins = []Coin{
{Ticker: "AXL", Name: "Axelar", IsDefault: false},
}
templ Coins() {
templ CoinSelect() {
<sl-select
label="Accounts"
name="selected_assets"

View File

@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.819
package islands
package input
//lint:file-ignore SA4006 This context is only used if a nested component is present.
@ -31,7 +31,7 @@ var defaultCoins = []Coin{
{Ticker: "AXL", Name: "Axelar", IsDefault: false},
}
func Coins() templ.Component {
func CoinSelect() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
@ -99,7 +99,7 @@ func CoinOption(a Coin) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/select/coin_select.templ`, Line: 58, Col: 29}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/input/coin_select.templ`, Line: 58, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@ -112,7 +112,7 @@ func CoinOption(a Coin) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/select/coin_select.templ`, Line: 59, Col: 41}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/input/coin_select.templ`, Line: 59, Col: 41}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@ -125,7 +125,7 @@ func CoinOption(a Coin) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/select/coin_select.templ`, Line: 60, Col: 11}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/input/coin_select.templ`, Line: 60, Col: 11}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@ -143,7 +143,7 @@ func CoinOption(a Coin) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/select/coin_select.templ`, Line: 64, Col: 29}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/input/coin_select.templ`, Line: 64, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@ -156,7 +156,7 @@ func CoinOption(a Coin) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(a.Ticker)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/select/coin_select.templ`, Line: 65, Col: 41}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/input/coin_select.templ`, Line: 65, Col: 41}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@ -169,7 +169,7 @@ func CoinOption(a Coin) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/select/coin_select.templ`, Line: 66, Col: 11}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/input/coin_select.templ`, Line: 66, Col: 11}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {

View File

@ -1,4 +1,4 @@
package islands
package slider
import "fmt"

View File

@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.819
package islands
package slider
//lint:file-ignore SA4006 This context is only used if a nested component is present.