Class: Dedalus::PatternLibrary::ApplicationSidebar
- Defined in:
- lib/dedalus/pattern_library/organisms/app_sidebar.rb
Instance Attribute Summary collapse
-
#current_entry ⇒ Object
_molecules.
-
#library_section_tabs ⇒ Object
_molecules.
Attributes inherited from Element
#background_color, #color, #height, #height_percent, #margin, #offset, #position, #shown, #width, #width_percent, #z_order
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Element
#big_font, #code_font, #draw_bounding_box, #font, #huge_font, #initialize, #record?, #tiny_font, #view, #window
Constructor Details
This class inherits a constructor from Dedalus::Element
Instance Attribute Details
#current_entry ⇒ Object
_molecules
4 5 6 |
# File 'lib/dedalus/pattern_library/organisms/app_sidebar.rb', line 4 def current_entry @current_entry end |
#library_section_tabs ⇒ Object
_molecules
4 5 6 |
# File 'lib/dedalus/pattern_library/organisms/app_sidebar.rb', line 4 def library_section_tabs @library_section_tabs end |
Class Method Details
.description ⇒ Object
21 22 23 |
# File 'lib/dedalus/pattern_library/organisms/app_sidebar.rb', line 21 def self.description "A sidebar for an application" end |
.example_data ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/dedalus/pattern_library/organisms/app_sidebar.rb', line 25 def self.example_data { library_section_tabs: [ LibrarySectionTab.example_data, LibrarySectionTab.example_data, LibrarySectionTab.example_data ] } end |
Instance Method Details
#library_section_tab_rows ⇒ Object
10 11 12 13 14 15 |
# File 'lib/dedalus/pattern_library/organisms/app_sidebar.rb', line 10 def library_section_tab_rows @tab_rows ||= self.library_section_tabs.map do |tab_data| #_molecules tab_data[:highlight] = tab_data[:name] == current_entry LibrarySectionTab.new(tab_data) end end |
#padding ⇒ Object
17 18 19 |
# File 'lib/dedalus/pattern_library/organisms/app_sidebar.rb', line 17 def padding 0 end |
#show ⇒ Object
6 7 8 |
# File 'lib/dedalus/pattern_library/organisms/app_sidebar.rb', line 6 def show library_section_tab_rows end |