Sha256: 8ae01d460a346bdaa99cf0721ac3db14221d22143f98ec76df0b0b3e0117ef66
Contents?: true
Size: 449 Bytes
Versions: 15
Compression:
Stored size: 449 Bytes
Contents
class InputErrorComponent < ViewComponent::Base erb_template <<~ERB <div <%= sanitize @attributes.join(" ") %>> <p class="text-sm text-red-600 dark:text-red-400"> <%= @message %> </p> </div> ERB def initialize(attributes = {}) @message = attributes[:message] @attributes = attributes.without(:message).map { |key, attribute| "#{key}=\"#{attribute}\"" } end def render? @message.present? end end
Version data entries
15 entries across 15 versions & 1 rubygems