mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 02:11:40 +00:00
refactor: update index views to use new nebula components
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package form
|
||||
|
||||
type InputHandleState string
|
||||
|
||||
const (
|
||||
InputHandleStateInitial InputHandleState = "inital"
|
||||
InputHandleStateValid InputHandleState = "valid"
|
||||
InputHandleStateInvalid InputHandleState = "invalid"
|
||||
)
|
||||
|
||||
func (s InputHandleState) string() string {
|
||||
return string(s)
|
||||
}
|
||||
|
||||
templ InputHandle() {
|
||||
<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>
|
||||
}
|
||||
|
||||
templ InputHandleError() {
|
||||
<sl-input name="handle" placeholder="digitalgold" type="text" label="Handle" minlength="4" maxlength="12" required class="border-red-500">
|
||||
<div slot="prefix">
|
||||
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
||||
</div>
|
||||
<div slot="suffix" style="color: #B54549;">
|
||||
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
||||
</div>
|
||||
</sl-input>
|
||||
}
|
||||
|
||||
templ InputHandleValid() {
|
||||
<sl-input name="handle" placeholder="digitalgold" type="text" label="Handle" minlength="4" maxlength="12" required class="border-green-500">
|
||||
<div slot="prefix" style="color: #46A758;">
|
||||
<sl-icon name="at-sign" library="sonr"></sl-icon>
|
||||
</div>
|
||||
</sl-input>
|
||||
}
|
||||
Reference in New Issue
Block a user