Class: IronAdmin::Dashboards::QuickLinksComponent

Inherits:
ViewComponent::Base
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(title: "Quick Links") ⇒ QuickLinksComponent

Returns a new instance of QuickLinksComponent.

Parameters:

  • title (String) (defaults to: "Quick Links")

    Title (default: "Quick Links")



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

#titleString (readonly)

Returns Section title.

Returns:

  • (String)

    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.

Returns:

  • (Boolean)

    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

#themeIronAdmin::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.

Returns:



19
20
21
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 19

def theme
  IronAdmin.configuration.theme
end