Sha256: c6631812d8c6ed81ea4dd226ee5f9c63514d3ef5ac3f1fd2a6556f523a52a3e7

Contents?: true

Size: 719 Bytes

Versions: 2

Compression:

Stored size: 719 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  # Displays the "Bulk actions" button and dropdown
  class BulkActionComponent < ViewComponent::Base
    def initialize(bulk_actions:, button_classes: 'btn btn-secondary dropdown-toggle')
      @bulk_actions = bulk_actions
      @button_classes = button_classes
      super
    end

    attr_reader :button_classes, :bulk_actions

    def button
      button_tag t(:'spotlight.bulk_actions.label'), id: 'bulk-actions-button', class: button_classes,
                                                     data: { toggle: 'dropdown', 'bs-toggle': 'dropdown' },
                                                     aria: { haspopup: true, expanded: false }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blacklight-spotlight-4.6.1 app/components/spotlight/bulk_action_component.rb
blacklight-spotlight-4.6.0 app/components/spotlight/bulk_action_component.rb