Sha256: c75c052cfae00092a3e51fac2d6e7795602e1036acaa944dabdd9ea6048e7c66

Contents?: true

Size: 935 Bytes

Versions: 64

Compression:

Stored size: 935 Bytes

Contents

# frozen_string_literal: true

module Ariadne
  # Add a general description of component here
  # Add additional usage considerations or best practices that may aid the user to use the component correctly.
  # @accessibility Add any accessibility considerations
  class BodyComponent < Ariadne::Component
    DEFAULT_CLASSES = "ariadne-scroll-smooth ariadne-bg-white ariadne-antialiased"

    # @example Default
    #
    #   <%= render(Ariadne::BodyComponent.new) { "Example" } %>
    #
    # @param classes [String] <%= link_to_classes_docs %>
    # @param attributes [Hash] <%= link_to_attributes_docs %>
    def initialize(classes: "", attributes: {})
      @tag = :body
      @classes = class_names(
        DEFAULT_CLASSES,
        classes,
      )

      @attributes = attributes
    end

    def call
      render(Ariadne::BaseComponent.new(tag: @tag, classes: @classes, attributes: @attributes)) { content }
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.24 app/components/ariadne/body_component.rb
ariadne_view_components-0.0.24-x86_64-linux app/components/ariadne/body_component.rb
ariadne_view_components-0.0.24-x86_64-darwin app/components/ariadne/body_component.rb
ariadne_view_components-0.0.24-x64-mingw32 app/components/ariadne/body_component.rb
ariadne_view_components-0.0.24-x64-mingw-ucrt app/components/ariadne/body_component.rb
ariadne_view_components-0.0.24-arm64-darwin app/components/ariadne/body_component.rb
ariadne_view_components-0.0.24-aarch64-linux app/components/ariadne/body_component.rb
ariadne_view_components-0.0.23 app/components/ariadne/body_component.rb
ariadne_view_components-0.0.23-x86_64-linux app/components/ariadne/body_component.rb
ariadne_view_components-0.0.23-x86_64-darwin app/components/ariadne/body_component.rb
ariadne_view_components-0.0.23-x64-mingw32 app/components/ariadne/body_component.rb
ariadne_view_components-0.0.23-x64-mingw-ucrt app/components/ariadne/body_component.rb
ariadne_view_components-0.0.23-arm64-darwin app/components/ariadne/body_component.rb
ariadne_view_components-0.0.23-aarch64-linux app/components/ariadne/body_component.rb
ariadne_view_components-0.0.22 app/components/ariadne/body_component.rb
ariadne_view_components-0.0.22-x86_64-linux app/components/ariadne/body_component.rb
ariadne_view_components-0.0.22-x86_64-darwin app/components/ariadne/body_component.rb
ariadne_view_components-0.0.22-x64-mingw32 app/components/ariadne/body_component.rb
ariadne_view_components-0.0.22-x64-mingw-ucrt app/components/ariadne/body_component.rb
ariadne_view_components-0.0.22-arm64-darwin app/components/ariadne/body_component.rb