Sha256: 937a02f4ee213f51d82682550af01c5a061b072132881d6ab9866278a55c2561
Contents?: true
Size: 638 Bytes
Versions: 8
Compression:
Stored size: 638 Bytes
Contents
module Spina module UserInterface class DropdownButtonComponent < ApplicationComponent attr_reader :disabled def initialize(disabled: false) @disabled = disabled end def call content_tag :button, content, {class: classes, type: :submit, disabled: disabled} end def classes if disabled "block w-full text-left px-3 py-2 text-sm leading-4 text-gray-400 font-medium cursor-default" else "block w-full text-left px-3 py-2 text-sm leading-4 text-gray-700 hover:bg-gray-100 hover:text-gray-900 font-medium" end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems