Class: IronAdmin::Dashboards::QuickLinksComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- IronAdmin::Dashboards::QuickLinksComponent
- Defined in:
- app/components/iron_admin/dashboards/quick_links_component.rb
Overview
Renders a quick links section on the dashboard.
Defined Under Namespace
Classes: LinkComponent
Instance Attribute Summary collapse
-
#title ⇒ String
readonly
Section title.
Instance Method Summary collapse
-
#initialize(title: "Quick Links") ⇒ QuickLinksComponent
constructor
A new instance of QuickLinksComponent.
-
#render? ⇒ Boolean
private
Whether to render the component.
-
#theme ⇒ IronAdmin::Configuration::Theme
private
Theme configuration.
Constructor Details
#initialize(title: "Quick Links") ⇒ QuickLinksComponent
Returns a new instance of QuickLinksComponent.
13 14 15 |
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 13 def initialize(title: "Quick Links") @title = title end |
Instance Attribute Details
#title ⇒ String (readonly)
Returns Section title.
10 11 12 |
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 10 def title @title end |
Instance Method Details
#render? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Whether to render the component.
25 26 27 |
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 25 def render? links.any? end |
#theme ⇒ IronAdmin::Configuration::Theme
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Theme configuration.
19 20 21 |
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 19 def theme IronAdmin.configuration.theme end |