Class: IronAdmin::Dashboards::QuickLinksComponent::LinkComponent Private

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/iron_admin/dashboards/quick_links_component.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Individual quick link item component.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label:, href:, icon: nil, description: nil) ⇒ LinkComponent

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 a new instance of LinkComponent.

Parameters:

  • label (String)

    Link label

  • href (String)

    Link URL

  • icon (String, nil) (defaults to: nil)

    Optional Heroicon name

  • description (String, nil) (defaults to: nil)

    Optional description



48
49
50
51
52
53
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 48

def initialize(label:, href:, icon: nil, description: nil)
  @label = label
  @href = href
  @icon = icon
  @description = description
end

Instance Attribute Details

#descriptionString? (readonly)

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 Optional description.

Returns:

  • (String, nil)

    Optional description



42
43
44
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 42

def description
  @description
end

#hrefString (readonly)

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 Link URL.

Returns:

  • (String)

    Link URL



36
37
38
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 36

def href
  @href
end

#iconString? (readonly)

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 Optional icon name.

Returns:

  • (String, nil)

    Optional icon name



39
40
41
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 39

def icon
  @icon
end

#labelString (readonly)

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 Link label.

Returns:

  • (String)

    Link label



33
34
35
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 33

def label
  @label
end

Instance Method Details

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



57
58
59
# File 'app/components/iron_admin/dashboards/quick_links_component.rb', line 57

def theme
  IronAdmin.configuration.theme
end