2022-10-11 01:57:18 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Layouts
|
|
|
|
class HorizontalSectionComponent < ViewComponent::Base
|
2023-07-09 08:55:56 +05:30
|
|
|
warn_on_deprecated_slot_setter
|
|
|
|
|
2022-10-11 01:57:18 +05:30
|
|
|
# @param [Boolean] border
|
|
|
|
# @param [Hash] options
|
|
|
|
def initialize(border: true, options: {})
|
|
|
|
@border = border
|
|
|
|
@options = options
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
renders_one :title
|
|
|
|
renders_one :description
|
|
|
|
renders_one :body
|
|
|
|
|
|
|
|
def formatted_options
|
|
|
|
@options.merge({ class: [('gl-border-b' if @border), @options[:class]].flatten.compact })
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|