mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-11 13:29:12 +00:00
* refactor: move database, navigator scripts to state package * feat: add Schema config for dwn * test: add unit tests for InitializeDatabase * feat: use templated index.html for the DWN frontend * feat: introduce templ generation for templ * chore(deps): update devbox.json to use latest packages * chore: update devbox to use bun * feat: introduce dwn config generation * feat: add motr.mjs for vault management * refactor: move front end from to (alert) * feat: implement devbox integration and devbox-based process management * feat: embed motr.mjs script for offline demo * refactor: embed motr.mjs data in embed.go * chore: update workflows to use actions/checkout@v4 * refactor: move process-compose.yaml to deploy directory * refactor: remove unnecessary JSON conversion
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
package blocks
|
|
|
|
templ RadioGroup() {
|
|
<div
|
|
x-data="{
|
|
radioGroupSelectedValue: null,
|
|
radioGroupOptions: [
|
|
{
|
|
title: 'Email Address',
|
|
description: 'Get a login code to your email address.',
|
|
value: 'email'
|
|
},
|
|
{
|
|
title: 'Phone Number',
|
|
description: 'Get a login code to your phone number.',
|
|
value: 'phone'
|
|
},
|
|
{
|
|
title: 'Passkey',
|
|
description: 'Sign in with your passkey.',
|
|
value: 'passkey'
|
|
}
|
|
]
|
|
}"
|
|
class="space-y-3"
|
|
>
|
|
<template x-for="(option, index) in radioGroupOptions" :key="index">
|
|
<label @click="radioGroupSelectedValue=option.value" class="flex items-start p-5 space-x-3 bg-white border rounded-md shadow-sm hover:bg-gray-50 border-neutral-200/70">
|
|
<input type="radio" name="radio-group" :value="option.value" class="text-gray-900 translate-y-px focus:ring-gray-700"/>
|
|
<span class="relative flex flex-col text-left space-y-1.5 leading-none">
|
|
<span x-text="option.title" class="font-semibold"></span>
|
|
<span x-text="option.description" class="text-sm opacity-50"></span>
|
|
</span>
|
|
</label>
|
|
</template>
|
|
</div>
|
|
}
|