Sha256: a29fb4516f41fc76ba508d759aac95473bfbaf6f4e907d71ab3f71f52ec69d56
Contents?: true
Size: 474 Bytes
Versions: 7
Compression:
Stored size: 474 Bytes
Contents
# frozen_string_literal: true module Spotlight # Component to render breadcrumbs class BreadcrumbsComponent < ViewComponent::Base attr_reader :breadcrumbs def initialize(breadcrumbs: []) @breadcrumbs = breadcrumbs super end def render? !helpers.resource_masthead? && breadcrumbs.present? end def path(path) return path unless path.instance_of?(::Spotlight::Exhibit) helpers.exhibit_path(path) end end end
Version data entries
7 entries across 7 versions & 1 rubygems