diff --git a/styleguidist/styleguide.config.js b/styleguidist/styleguide.config.js index d35877b..1d72455 100644 --- a/styleguidist/styleguide.config.js +++ b/styleguidist/styleguide.config.js @@ -20,6 +20,24 @@ module.exports = { */ version: "0.0.1", + /** + * Allows components to be grouped into sections with a title and overview content. + * Sections can also be content only, with no associated components (for example, a textual introduction). + * Sections can be nested. + * @type {Array} + * @see https://react-styleguidist.js.org/docs/configuration#sections + */ + sections: [ + { + name: "Getting Started", + content: "../docs/Styleguidist/Introduction.md", + }, + { + name: "Components", + components: '../src/components/**/[A-Z]*.js', + } + ], + /** * Defines the initial state of the example code tab. * @type {string} "collapse" | "hide" | "expand" @@ -50,24 +68,6 @@ module.exports = { path.join(__dirname, "./material-icon.css"), path.join(__dirname, "./roboto-font.css"), ], - - /** - * Allows components to be grouped into sections with a title and overview content. - * Sections can also be content only, with no associated components (for example, a textual introduction). - * Sections can be nested. - * @type {Array} - * @see https://react-styleguidist.js.org/docs/configuration#sections - */ - sections: [ - { - name: "Getting Started", - content: "../docs/Styleguidist/Introduction.md", - }, - { - name: "Components", - components: '../src/components/**/[A-Z]*.js', - } - ], /** * Change HTML for the style guide app. @@ -91,5 +91,18 @@ module.exports = { * using a theme object or the path to a file exporting such object. * @type {Object | String} */ - theme: "styleguide.theme.js" + theme: "styleguide.theme.js", + + /** + * Used to specify a default example if a component doesn't have one. + * Use a boolean to use or not use the default example from Styleguidist. + * Use a string to specify the relative path to your own default example + * written in markdown. `__COMPONENET__` will be replaced with the name of + * the real component at compile time. + * @type {boolean | String} + * @example "./defaultExample.md" + * @example true + * @default false + */ + defaultExample: true, } \ No newline at end of file