Sha256: c9ebf1e3d734c8d20a9e474d9dda670580caa6a177cf67499d5f77aed6474daa
Contents?: true
Size: 1.1 KB
Versions: 11
Compression:
Stored size: 1.1 KB
Contents
# typed: false # frozen_string_literal: true module Ariadne module Layout module LabelBlock class Component < Ariadne::BaseComponent option :label accepts_html_attributes do |html_attrs| end # Trailing visuals appear to the right of the label text. # # Use: # # - `trailing_visual_button` for a <%= link_to_component(Ariadne::UI::Button::Component) %>. renders_one :trailing_visual, types: { button: lambda { |**options| options[:size] ||= :xs options[:theme] ||= :none options[:html_attrs] ||= {} options[:html_attrs][:class] = Ariadne::ViewComponents.tailwind_merger.merge([style(:trailing_visual), options[:html_attrs][:class] || ""].join(" ")) Ariadne::UI::Button::Component.new(**options) }, } style(:trailing_visual) do base do [ "araidne-pl-2", "ariadne-text-gray-400", "hover:ariadne-text-gray-500", ] end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems