2023-10-02 23:10:49 +03:00
|
|
|
<script>
|
|
|
|
|
import { uniqueId } from "lodash";
|
|
|
|
|
export let label;
|
|
|
|
|
export let name;
|
|
|
|
|
export let group;
|
|
|
|
|
export let value;
|
2024-08-17 21:10:01 +03:00
|
|
|
export let help = "";
|
2023-10-02 23:10:49 +03:00
|
|
|
let id = uniqueId();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="form-check">
|
|
|
|
|
<input
|
|
|
|
|
class="form-check-input"
|
|
|
|
|
type="radio"
|
|
|
|
|
{value}
|
|
|
|
|
{name}
|
|
|
|
|
bind:group
|
|
|
|
|
{id}
|
|
|
|
|
/>
|
|
|
|
|
<label class="form-check-label" for={id}>
|
|
|
|
|
{label}
|
|
|
|
|
</label>
|
|
|
|
|
{#if help}
|
|
|
|
|
<span class="text-muted">{help}</span>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|