Sha256: 36d924508ae5584a0359d75407b354cdf20be95a3b282118462b28ecb921c9e3
Contents?: true
Size: 387 Bytes
Versions: 3
Compression:
Stored size: 387 Bytes
Contents
# frozen_string_literal: true module Heading class HComponent < ViewComponent::Base def initialize(**options) @text = options[:text] @tag = options[:tag] @classes = options[:classes] @styles = options[:styles] end def call content_tag(@tag, content || @text, class: @classes, style: @styles ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bsvc-0.1.2 | app/components/heading/h_component.rb |
bsvc-0.1.1 | app/components/heading/h_component.rb |
bsvc-0.1.0 | app/components/heading/h_component.rb |