mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
22 lines
528 B
Plaintext
22 lines
528 B
Plaintext
|
package ui
|
||
|
|
||
|
type InputHandleState string
|
||
|
|
||
|
const (
|
||
|
InputHandleStateInitial InputHandleState = "inital"
|
||
|
InputHandleStateValid InputHandleState = "valid"
|
||
|
InputHandleStateInvalid InputHandleState = "invalid"
|
||
|
)
|
||
|
|
||
|
func (s InputHandleState) string() string {
|
||
|
return string(s)
|
||
|
}
|
||
|
|
||
|
templ InputHandle(handle string) {
|
||
|
<sl-input name="handle" placeholder="digitalgold" type="text" label="Handle" minlength="4" maxlength="12" required>
|
||
|
<div slot="prefix">
|
||
|
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
||
|
</div>
|
||
|
</sl-input>
|
||
|
}
|