Class: Documentation::BodyComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/documentation/body_component.rb

Constant Summary collapse

CSS_CLASSES_DEFAULT =
%w[mb-2].freeze
CSS_CLASSES =
(
  %w[bg-base-200 bg-base-300 text-secondary overflow-auto cursor-pointer absolute m-3 right-1] +
  CSS_CLASSES_DEFAULT +
  Documentation::Body::ExamplePreviewComponent::CSS_CLASSES
).freeze

Instance Method Summary collapse

Constructor Details

#initialize(preview_options: {}, code_options: {}) ⇒ BodyComponent

Returns a new instance of BodyComponent.



14
15
16
17
18
19
20
# File 'app/components/documentation/body_component.rb', line 14

def initialize(
    preview_options: {},
    code_options: {}
  )
  @preview_options = preview_options
  @code_options = code_options
end