Sha256: b7ac3d95be9e0376a7edf715572ec0d4ba6fc60197816e9b677d416f7be7cdcf
Contents?: true
Size: 919 Bytes
Versions: 2
Compression:
Stored size: 919 Bytes
Contents
# frozen_string_literal: true module Primer # :nodoc: module Deprecations # If there is no alternative to suggest, set the value to nil DEPRECATED_COMPONENTS = { "Primer::Alpha::AutoComplete" => "Primer::Beta::AutoComplete", "Primer::Alpha::AutoComplete::Item" => "Primer::Beta::AutoComplete::Item", "Primer::BlankslateComponent" => "Primer::Beta::Blankslate", "Primer::BoxComponent" => "Primer::Box", "Primer::CounterComponent" => "Primer::Beta::Counter", "Primer::DropdownMenuComponent" => nil, "Primer::IconButton" => "Primer::Beta::IconButton", "Primer::Tooltip" => "Primer::Alpha::Tooltip" }.freeze def self.deprecated?(name) DEPRECATED_COMPONENTS.key?(name) end def self.suggested_component(name) DEPRECATED_COMPONENTS[name] end def self.correctable?(name) !suggested_component(name).nil? end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
primer_view_components-0.0.104 | lib/primer/deprecations.rb |
primer_view_components-0.0.103 | lib/primer/deprecations.rb |