Sha256: 0f24f59adb163d194b0739b243906dcdadf5d23d928bcc07fe3b148e1a912a13
Contents?: true
Size: 1022 Bytes
Versions: 24
Compression:
Stored size: 1022 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
24 entries across 24 versions & 1 rubygems