-
Hello, I'm trying to define some scenarios programatically, eg. # @!group Colors
ButtonComponent::COLORS.each do |color|
define_method :"with_#{color}_color" do
render ButtonComponent.new(color: color) do
"Create product"
end
end
end
# @!endgroup But it isn't working, these scenarios don't appear on Lookbook. Am I missing something? Or Lookbook doesn't accept metaprogramming for scenarios? |
Beta Was this translation helpful? Give feedback.
Answered by
mryurii
Mar 13, 2024
Replies: 1 comment 1 reply
-
It's not supported – #154 (comment) Seems like one |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
stephannv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not supported – #154 (comment)
Seems like one
#with_all_colors
scenario that renders multiple component variations is the way to go