Class: Keystone::Ui::ShowPageComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/keystone/ui/show_page_component.rb

Constant Summary collapse

DESKTOP_WRAPPER_CLASSES =
"hidden md:block"
TITLE_CLASSES =
"text-2xl font-semibold text-gray-900 dark:text-white"
SUBTITLE_CLASSES =
"mt-1 text-sm text-gray-500 dark:text-gray-400"

Instance Method Summary collapse

Constructor Details

#initialize(title:, back_url:, subtitle: nil) ⇒ ShowPageComponent

Returns a new instance of ShowPageComponent.



10
11
12
13
14
# File 'app/components/keystone/ui/show_page_component.rb', line 10

def initialize(title:, back_url:, subtitle: nil)
  @title = title
  @back_url = back_url
  @subtitle = subtitle
end

Instance Method Details

#subtitle?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/components/keystone/ui/show_page_component.rb', line 16

def subtitle?
  !@subtitle.nil?
end