mirror of
https://github.com/System-End/identity-vault.git
synced 2026-04-19 19:45:08 +00:00
less ugly checkboxes
This commit is contained in:
parent
19f65de9bc
commit
d87ecdb2f7
2 changed files with 5 additions and 1 deletions
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
|
||||
body {
|
||||
--checkbox-true: #1cdd00;
|
||||
--checkbox-false: #ec0606;
|
||||
max-width: 120ch;
|
||||
padding-top: 3ch;
|
||||
padding-left: 2ch;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
module Backend::ApplicationHelper
|
||||
def render_checkbox(value)
|
||||
content_tag(:span, style: "color: var(--checkbox-#{value ? "true" : "false"})") { value ? inline_icon("checkbox", size: 16) : inline_icon("cancel", size: 16) }
|
||||
symbol = value ? "☑" : "☐"
|
||||
color = "var(--checkbox-#{value ? "true" : "false"})"
|
||||
content_tag(:span, symbol, style: "color: #{color}; font-size: 1.3em")
|
||||
end
|
||||
|
||||
def super_admin_tool(class_name: "", element: "div", **options, &block)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue