Skip to content

Commit

Permalink
🧪 Add the first two stories of our button
Browse files Browse the repository at this point in the history
  • Loading branch information
nando committed Jan 3, 2022
1 parent 00cefa7 commit d04f783
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/appraise/examples/my_components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# My Components' examples

This is the file __test/appraise/examples/my_components.md__ where the different components in the app could have an alternative doc to Storybook's one...

## Button Component
### With short text
~~~yaml example="Button w short text" fixture="url.js"
path: /rails/stories/button_component/with_short_text
~~~

### With long text
~~~yaml example="Button w long text" fixture="url.js"
path: /rails/stories/button_component/with_long_text
~~~
5 changes: 5 additions & 0 deletions test/appraise/fixtures/url.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = function (params) {
return `http://localhost:3000${params.path}`;
};
21 changes: 21 additions & 0 deletions test/components/stories/button_component.stories.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"title": "Button Component",
"stories": [
{
"name": "with_short_text",
"parameters": {
"server": {
"id": "button_component/with_short_text"
}
}
},
{
"name": "with_long_text",
"parameters": {
"server": {
"id": "button_component/with_long_text"
}
}
}
]
}

0 comments on commit d04f783

Please sign in to comment.