Sha256: ad2b48c03fb36c62b0b27c7b944f9fe9357a31d71095c9134ba252df0727b9be
Contents?: true
Size: 1023 Bytes
Versions: 148
Compression:
Stored size: 1023 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 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 = class_names( DEFAULT_CLASSES, classes, ) @attributes = attributes end end end
Version data entries
148 entries across 148 versions & 1 rubygems