removie stories helper array and to_sym
MODIFY
app/components/primer/label_component.rb
app/components/primer/label_component.rb
@@ -36,8 +36,8 @@ module Primer
@kwargs[:classes] = class_names(
"Label",
kwargs[:classes],
- SCHEME_MAPPINGS[fetch_or_fallback(SCHEME_OPTIONS, scheme.to_sym)],
- VARIANT_MAPPINGS[fetch_or_fallback(VARIANT_OPTIONS, variant.to_sym)]
+ SCHEME_MAPPINGS[fetch_or_fallback(SCHEME_OPTIONS, scheme)],
+ VARIANT_MAPPINGS[fetch_or_fallback(VARIANT_OPTIONS, variant)]
)
end

MODIFY
stories/primer/label_component_stories.rb
stories/primer/label_component_stories.rb
@@ -6,8 +6,8 @@ class Primer::LabelComponentStories < ViewComponent::Storybook::Stories
story(:label) do
controls do
title "this is a label"
- select(:scheme, Primer::StoriesHelper.array_to_options(Primer::LabelComponent::SCHEME_MAPPINGS.keys), :blue)
- select(:variant, Primer::StoriesHelper.array_to_options(Primer::LabelComponent::VARIANT_MAPPINGS.keys), :large)
+ select(:scheme, (Primer::LabelComponent::SCHEME_MAPPINGS.keys), :blue)
+ select(:variant, (Primer::LabelComponent::VARIANT_MAPPINGS.keys), :large)
end
content do

removie stories helper array and to_sym