mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 10:21:40 +00:00
refactor: update index views to use new nebula components
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package form
|
||||
|
||||
templ Root(action, method, id string) {
|
||||
<form action={ templ.SafeURL(action) } method={ method } id={ id }>
|
||||
{ children... }
|
||||
</form>
|
||||
}
|
||||
|
||||
templ Header() {
|
||||
<div slot="header">
|
||||
<div class="w-full py-2">
|
||||
{ children... }
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ Body() {
|
||||
<sl-card class="card-form max-w-lg">
|
||||
{ children... }
|
||||
<style>
|
||||
.card-form {
|
||||
space-y: 1rem;
|
||||
}
|
||||
|
||||
.card-form [slot='header'] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-form [slot='footer'] {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
</sl-card>
|
||||
}
|
||||
|
||||
templ Footer() {
|
||||
<div slot="footer">
|
||||
{ children... }
|
||||
</div>
|
||||
}
|
||||
|
||||
templ CancelButton() {
|
||||
<sl-button href="/" outline>
|
||||
<sl-icon slot="prefix" name="x-lg"></sl-icon>
|
||||
Cancel
|
||||
</sl-button>
|
||||
}
|
||||
|
||||
templ SubmitButton(text string) {
|
||||
<sl-button type="submit">
|
||||
{ text }
|
||||
<sl-icon slot="suffix" name="arrow-right" library="sonr"></sl-icon>
|
||||
</sl-button>
|
||||
}
|
||||
Reference in New Issue
Block a user