Class: RUI::Card
- Inherits:
-
Base
- Object
- Phlex::HTML
- Base
- RUI::Card
show all
- Defined in:
- lib/rui/card.rb
Defined Under Namespace
Classes: Footer, Header
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Constructor Details
This class inherits a constructor from RUI::Base
Instance Method Details
#body ⇒ Object
22
23
24
|
# File 'lib/rui/card.rb', line 22
def body(&)
div(class: "px-4", &)
end
|
26
27
28
|
# File 'lib/rui/card.rb', line 26
def (&)
render .new(&)
end
|
14
15
16
|
# File 'lib/rui/card.rb', line 14
def (&)
render .new(&)
end
|
#image ⇒ Object
18
19
20
|
# File 'lib/rui/card.rb', line 18
def image(&)
img(src: capture(&))
end
|
#view_template ⇒ Object
4
5
6
7
8
9
10
11
12
|
# File 'lib/rui/card.rb', line 4
def view_template(&)
div(role: "region", aria: { label: "Card" }, **@attrs) do
div(
class: "#{padding(capture(&))} flex flex-col gap-4 border border-zinc-300 rounded-lg overflow-hidden",
data: { component: "card" },
&
)
end
end
|