Sha256: 9bf18e403849f9c9d630a1c3b8bf617dd30eb0671e2067726a1c1d57c5ae9eb9
Contents?: true
Size: 1 KB
Versions: 122
Compression:
Stored size: 1 KB
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 NarrowContainerComponent < Ariadne::Component DEFAULT_TAG = :div TAG_OPTIONS = [DEFAULT_TAG].freeze DEFAULT_CLASSES = "ariadne-max-w-7xl ariadne-mx-auto ariadne-py-12 ariadne-px-4 sm:ariadne-px-6 lg:ariadne-py-16 lg:ariadne-px-8" # @example Default # <%= render(Ariadne::NarrowContainerComponent.new) do |container| %> # <%= render(Ariadne::ButtonComponent.new) { "Click me!" } %> # <% end %> # # @param classes [String] <%= link_to_classes_docs %> # @param attributes [Hash] <%= link_to_attributes_docs %> def initialize(classes: "", attributes: {}) @tag = :div @classes = merge_class_names( DEFAULT_CLASSES, classes, ) @attributes = attributes end end end
Version data entries
122 entries across 122 versions & 1 rubygems