Commit 73455fb8 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'tomquirk-master-patch-39537' into 'master'

Fix naming example in Storybook docs

See merge request gitlab-org/gitlab!71360
parents 8ab3559c 809480fd
...@@ -2,7 +2,7 @@ import { ContentEditor } from './index'; ...@@ -2,7 +2,7 @@ import { ContentEditor } from './index';
export default { export default {
component: ContentEditor, component: ContentEditor,
title: 'Components/Content Editor', title: 'content_editor/components/content_editor',
}; };
const Template = (_, { argTypes }) => ({ const Template = (_, { argTypes }) => ({
......
...@@ -4,7 +4,7 @@ import TodoButton from './todo_button.vue'; ...@@ -4,7 +4,7 @@ import TodoButton from './todo_button.vue';
export default { export default {
component: TodoButton, component: TodoButton,
title: 'vue_shared/components/todo_toggle/todo_button', title: 'vue_shared/components/sidebar/todo_toggle/todo_button',
}; };
const Template = (args, { argTypes }) => ({ const Template = (args, { argTypes }) => ({
......
...@@ -39,16 +39,16 @@ To add a story: ...@@ -39,16 +39,16 @@ To add a story:
vue_shared/ vue_shared/
├─ components/ ├─ components/
│ ├─ sidebar │ ├─ sidebar
│ │ ├─ todo_button.vue │ | ├─ todo_toggle
│ │ ├─ todo_button.stories.js │ | | ├─ todo_button.vue
│ │ | ├─ todo_button.stories.js
``` ```
1. Write the story as per the [official Storybook instructions](https://storybook.js.org/docs/vue/writing-stories/introduction/) 1. Write the story as per the [official Storybook instructions](https://storybook.js.org/docs/vue/writing-stories/introduction/)
Notes: Notes:
- Specify the `title` field of the story as the component's file path from the `javascripts/` directory, - Specify the `title` field of the story as the component's file path from the `javascripts/` directory,
e.g. if the component is located at `app/assets/javascripts/vue_shared/components/sidebar/todo_toggle/todo_button.vue`, specify the `title` as e.g. if the component is located at `app/assets/javascripts/vue_shared/components/sidebar/todo_toggle/todo_button.vue`, specify the story `title` as `vue_shared/components/sidebar/todo_toggle/todo_button`. This will ensure the Storybook navigation maps closely to our internal directory structure.
`vue_shared/components/To-do Button`. This will ensure the Storybook navigation maps closely to our internal directory structure.
## Mock backend APIs ## Mock backend APIs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment