Class: Views::Base

Inherits:
Phlex::HTML
  • Object
show all
Defined in:
lib/ruby_ui/docs/base.rb

Instance Method Summary collapse

Instance Method Details

#Alert ⇒ Object

Alert component helpers



25
26
27
# File 'lib/ruby_ui/docs/base.rb', line 25

def Alert(&)
  div(&)
end

#AlertDescription ⇒ Object



33
34
35
# File 'lib/ruby_ui/docs/base.rb', line 33

def AlertDescription(&)
  p(&)
end

#AlertTitle ⇒ Object



29
30
31
# File 'lib/ruby_ui/docs/base.rb', line 29

def AlertTitle(&)
  h4(&)
end

#component_files(component_name) ⇒ Object



10
11
12
# File 'lib/ruby_ui/docs/base.rb', line 10

def component_files(component_name)
  []
end

#docs_accordion_path ⇒ Object



46
47
48
# File 'lib/ruby_ui/docs/base.rb', line 46

def docs_accordion_path
  "#"
end

#docs_alert_dialog_path ⇒ Object



54
55
56
# File 'lib/ruby_ui/docs/base.rb', line 54

def docs_alert_dialog_path
  "#"
end

#docs_alert_path ⇒ Object



50
51
52
# File 'lib/ruby_ui/docs/base.rb', line 50

def docs_alert_path
  "#"
end

#docs_aspect_ratio_path ⇒ Object



58
59
60
# File 'lib/ruby_ui/docs/base.rb', line 58

def docs_aspect_ratio_path
  "#"
end

#docs_avatar_path ⇒ Object



62
63
64
# File 'lib/ruby_ui/docs/base.rb', line 62

def docs_avatar_path
  "#"
end

#docs_badge_path ⇒ Object



66
67
68
# File 'lib/ruby_ui/docs/base.rb', line 66

def docs_badge_path
  "#"
end

#docs_installation_path ⇒ Object



70
71
72
# File 'lib/ruby_ui/docs/base.rb', line 70

def docs_installation_path
  "#"
end

#docs_separator_path ⇒ Object



42
43
44
# File 'lib/ruby_ui/docs/base.rb', line 42

def docs_separator_path
  "#"
end

#docs_sheet_path ⇒ Object

Route helper stubs - return "#" as placeholder



38
39
40
# File 'lib/ruby_ui/docs/base.rb', line 38

def docs_sheet_path
  "#"
end

#Heading(level:) ⇒ Object



5
6
7
8
# File 'lib/ruby_ui/docs/base.rb', line 5

def Heading(level:, &)
  tag = :"h#{level}"
  send(tag, &)
end

#InlineCode ⇒ Object

InlineCode helper for typography examples



75
76
77
# File 'lib/ruby_ui/docs/base.rb', line 75

def InlineCode(&)
  code(&)
end

InlineLink helper for documentation links



20
21
22
# File 'lib/ruby_ui/docs/base.rb', line 20

def InlineLink(href:, target: nil, class: nil, &)
  a(href: href, target: target, class: binding.local_variable_get(:class), &)
end

#Text ⇒ Object

Text helper for wrapping paragraphs



15
16
17
# File 'lib/ruby_ui/docs/base.rb', line 15

def Text(&)
  p(&)
end