Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<form class="space-y-4 border rounded-md p-6 max-w-sm" action="#" method="post">
<fieldset class="space-y-3">
<legend class="text-sm font-medium mb-2">Notification preferences</legend>
<label for="ui-cb-c7fb3bac" class="inline-flex items-center gap-2 select-none">
<span class="relative inline-flex">
<input id="ui-cb-c7fb3bac" type="checkbox" name="prefs[email]" value="1" checked="checked" class="peer appearance-none shrink-0 border border-input bg-background transition-all checked:bg-primary checked:border-primary focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background w-4 h-4 rounded-[4px]">
<span class="pointer-events-none absolute inset-0 flex items-center justify-center text-primary-foreground opacity-0 peer-checked:opacity-100 transition-opacity">
<i data-lucide="check" class="inline-block shrink-0 w-3 h-3 stroke-[3]" aria-hidden="true"></i>
</span></span> <span class="text-sm leading-none">Email notifications</span>
</label>
<label for="ui-cb-b096e5c0" class="inline-flex items-center gap-2 select-none">
<span class="relative inline-flex">
<input id="ui-cb-b096e5c0" type="checkbox" name="prefs[push]" value="1" class="peer appearance-none shrink-0 border border-input bg-background transition-all checked:bg-primary checked:border-primary focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background w-4 h-4 rounded-[4px]">
<span class="pointer-events-none absolute inset-0 flex items-center justify-center text-primary-foreground opacity-0 peer-checked:opacity-100 transition-opacity">
<i data-lucide="check" class="inline-block shrink-0 w-3 h-3 stroke-[3]" aria-hidden="true"></i>
</span></span> <span class="text-sm leading-none">Push notifications</span>
</label>
<label for="ui-cb-41eccd91" class="inline-flex items-center gap-2 select-none cursor-not-allowed opacity-60">
<span class="relative inline-flex">
<input id="ui-cb-41eccd91" type="checkbox" name="prefs[sms]" value="1" disabled="disabled" class="peer appearance-none shrink-0 border border-input bg-background transition-all checked:bg-primary checked:border-primary focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background w-4 h-4 rounded-[4px]">
<span class="pointer-events-none absolute inset-0 flex items-center justify-center text-primary-foreground opacity-0 peer-checked:opacity-100 transition-opacity">
<i data-lucide="check" class="inline-block shrink-0 w-3 h-3 stroke-[3]" aria-hidden="true"></i>
</span></span> <span class="text-sm leading-none text-muted-foreground">SMS (unavailable)</span>
</label>
</fieldset>
<button type="submit" class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1 ring-offset-background disabled:pointer-events-none disabled:bg-muted! disabled:text-muted-foreground! bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 disabled:cursor-not-allowed" aria-busy="false">Save preferences</button>
</form>
1
2
3
4
5
6
7
8
9
<form class="space-y-4 border rounded-md p-6 max-w-sm" action="#" method="post">
<fieldset class="space-y-3">
<legend class="text-sm font-medium mb-2">Notification preferences</legend>
<%= render(UI::Checkbox.new(name: "prefs[email]", checked: true, label: "Email notifications")) %>
<%= render(UI::Checkbox.new(name: "prefs[push]", label: "Push notifications")) %>
<%= render(UI::Checkbox.new(name: "prefs[sms]", disabled: true, label: "SMS (unavailable)")) %>
</fieldset>
<%= render(UI::Button.new(type: :submit)) { "Save preferences" } %>
</form>