Skip to content

Commit

Permalink
Begin using default example for styleguidist
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbel committed Sep 4, 2020
1 parent e8a8928 commit 617086e
Showing 1 changed file with 32 additions and 19 deletions.
51 changes: 32 additions & 19 deletions styleguidist/styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.
Expand All @@ -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,
}

0 comments on commit 617086e

Please sign in to comment.