mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Create first story for ExampleComponent
- Once story has been created, still need to generate the story itself (in json file format). Help with command: `rake view_component_storybook:write_stories_json`
This commit is contained in:
13
spec/components/stories/example_component_stories.rb
Normal file
13
spec/components/stories/example_component_stories.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class ExampleComponentStories < ViewComponent::Storybook::Stories
|
||||
story(:with_short_text) do
|
||||
controls do
|
||||
text(:title, 'OK')
|
||||
end
|
||||
end
|
||||
|
||||
story(:with_long_text) do
|
||||
controls do
|
||||
text(:title, 'This is a long text')
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user