Sha256: 15ca39e81cccb331b0b8dd5d8d6522e14691e2c516fd94fe02a1c3a5a1c818fd

Contents?: true

Size: 330 Bytes

Versions: 2

Compression:

Stored size: 330 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  module Translations
    # Draws a sub-heading for a translation.
    class SubheadingComponent < ViewComponent::Base
      def initialize(key:)
        @key = key
        super
      end

      def text
        t(@key, scope: 'spotlight.translations')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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