Class: Protos::Hero

Inherits:
Component show all
Defined in:
lib/protos/hero.rb,
lib/protos/hero/content.rb,
lib/protos/hero/overlay.rb

Defined Under Namespace

Classes: Content, Overlay

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#contentObject



13
# File 'lib/protos/hero.rb', line 13

def content(...) = render Content.new(...)

#overlayObject



15
# File 'lib/protos/hero.rb', line 15

def overlay(...) = render Overlay.new(...)

#view_templateObject

DOCS: A hero component for a page. It will center the content an optionally layout an image for a responsive layout. daisyui.com/components/hero/



9
10
11
# File 'lib/protos/hero.rb', line 9

def view_template(&)
  div(**attrs, &)
end