Sha256: dc54080a3ef6d39009ec0f426bd76a243e60a81c5dc240aa29d982049ae9a6b1

Contents?: true

Size: 663 Bytes

Versions: 10

Compression:

Stored size: 663 Bytes

Contents

# typed: false
# frozen_string_literal: true

module Ariadne
  module UI
    module Blankslate
      class Component < Ariadne::BaseComponent
        option :size, default: proc { :base }

        option :title
        option :description, optional: true

        renders_one :icon, Ariadne::UI::Heroicon::Component

        def before_render
          icon&.dark_mode = :invert
        end

        def title_type_from_size
          case size
          when :base
            :h2
          when :sm

          end
        end

        def description_type_from_size
        end

        def base?
          size == :base
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.78 app/components/ariadne/ui/blankslate/component.rb
ariadne_view_components-0.0.77 app/components/ariadne/ui/blankslate/component.rb
ariadne_view_components-0.0.76.1 app/components/ariadne/ui/blankslate/component.rb
ariadne_view_components-0.0.76 app/components/ariadne/ui/blankslate/component.rb
ariadne_view_components-0.0.75 app/components/ariadne/ui/blankslate/component.rb
ariadne_view_components-0.0.74.1 app/components/ariadne/ui/blankslate/component.rb
ariadne_view_components-0.0.74 app/components/ariadne/ui/blankslate/component.rb
ariadne_view_components-0.0.73 app/components/ariadne/ui/blankslate/component.rb
ariadne_view_components-0.0.72 app/components/ariadne/ui/blankslate/component.rb
ariadne_view_components-0.0.71 app/components/ariadne/ui/blankslate/component.rb