less ugly checkboxes

This commit is contained in:
24c02 2025-12-03 02:39:57 -05:00
parent 19f65de9bc
commit d87ecdb2f7
2 changed files with 5 additions and 1 deletions

View file

@ -22,6 +22,8 @@
body {
--checkbox-true: #1cdd00;
--checkbox-false: #ec0606;
max-width: 120ch;
padding-top: 3ch;
padding-left: 2ch;

View file

@ -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)