Sha256: 1a4642b028f9958dbae37f9b72a675eef0b5fffd4ae728a014933626cd00b234
Contents?: true
Size: 924 Bytes
Versions: 122
Compression:
Stored size: 924 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-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 = merge_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
122 entries across 122 versions & 1 rubygems
Version | Path |
---|---|
ariadne_view_components-0.0.35-arm64-darwin | app/components/ariadne/body_component.rb |
ariadne_view_components-0.0.35-aarch64-linux | app/components/ariadne/body_component.rb |