mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
refactor: move gateway and vault components to new locations
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package islands
|
||||
|
||||
type HandleState string
|
||||
|
||||
const (
|
||||
HandleStateInitial HandleState = "inital"
|
||||
HandleStateValid HandleState = "valid"
|
||||
HandleStateInvalid HandleState = "invalid"
|
||||
)
|
||||
|
||||
func (s HandleState) string() string {
|
||||
return string(s)
|
||||
}
|
||||
|
||||
templ InputHandle() {
|
||||
<div hx-target="this" hx-swap="outerHTML">
|
||||
<sl-input name="handle" placeholder="digitalgold" type="text" label="Handle" minlength="4" maxlength="12" required hx-post="/register/profile" hx-indicator="#handle-indicator" autofocus>
|
||||
<div slot="prefix">
|
||||
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
||||
</div>
|
||||
</sl-input>
|
||||
</div>
|
||||
<br/>
|
||||
}
|
||||
|
||||
templ InputHandleError(value string, helpText string) {
|
||||
<sl-input name="handle" placeholder="digitalgold" type="text" label="Handle" minlength="4" maxlength="12" required class="border-red-500" value={ value } help-text={ helpText }>
|
||||
<div slot="prefix">
|
||||
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
||||
</div>
|
||||
<div slot="suffix" style="color: #B54549;">
|
||||
<sl-icon name="x"></sl-icon>
|
||||
</div>
|
||||
</sl-input>
|
||||
<br/>
|
||||
}
|
||||
|
||||
templ InputHandleSuccess(value string) {
|
||||
<sl-input name="handle" placeholder="digitalgold" type="text" label="Handle" minlength="4" maxlength="12" required class="border-green-500" value={ value } disabled>
|
||||
<div slot="prefix" style="color: #46A758;">
|
||||
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
||||
</div>
|
||||
</sl-input>
|
||||
<br/>
|
||||
}
|
||||
Reference in New Issue
Block a user