Sha256: ce0b8d9c023e21e01c4f2804891e69eaad87ea569e35e5572f14de0f2f0c870f
Contents?: true
Size: 512 Bytes
Versions: 19
Compression:
Stored size: 512 Bytes
Contents
class AuthSessionStatusComponent < ViewComponent::Base erb_template <<~ERB <div <%= sanitize @attributes.join(" ") %>> <%= @status %> </div> ERB def initialize(attributes = {}) @status = attributes[:status] attributes[:class] = "font-medium text-sm text-green-600 dark:text-green-400#{" #{attributes[:class]}" if attributes[:class]}" @attributes = attributes.without(:status).map { |key, attribute| "#{key}=\"#{attribute}\"" } end def render? @status.present? end end
Version data entries
19 entries across 19 versions & 1 rubygems