From a28ae6199d6722569fa87feee71bb993b3cf132a Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Wed, 19 Aug 2020 15:18:35 -0400 Subject: [PATCH] Update stylguidist configuration --- styleguide.config.js | 43 +++++++++++++++++++++++++++++++++++++++---- styleguide.style.js | 10 ++++++++++ styleguide.theme.js | 4 ++++ 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 styleguide.style.js create mode 100644 styleguide.theme.js diff --git a/styleguide.config.js b/styleguide.config.js index b9c5d43..01cfa6a 100644 --- a/styleguide.config.js +++ b/styleguide.config.js @@ -1,9 +1,44 @@ +const path = require('path') module.exports = { - components: 'src/components/**/[A-Z]*.js', + title: "webqueue2 Frontend Docs", + version: "0.0.1", + + // How the example source code is shown. + // [ "collapse", "expand", "hide" ] + // Default: collapse + exampleMode: "collapse", + + // How methods and props are shown. + // [ "collapse", "expand", "hide" ] + // Default: collapse + usageMode: "collapse", + + // Creates separate pages for top level nav items. + // Default: "false" + pagePerSection: true, + + // Styleguide Includes + require: [ + // Material UI Resources + path.join(__dirname, "docs/Styleguidist/material-icon.css"), + path.join(__dirname, "docs/Styleguidist/roboto-font.css"), + ], + sections: [ { name: "Getting Started", - content: "./src/Styleguidist Introduction.md", + content: "./docs/Styleguidist/Introduction.md", + }, + { + name: "Components", + components: 'src/components/**/[A-Z]*.js', } - ] - } \ No newline at end of file + ], + + template: { + favicon: "public/favicon.ico", + }, + + styles: "styleguide.style.js", + theme: "styleguide.theme.js" +} \ No newline at end of file diff --git a/styleguide.style.js b/styleguide.style.js new file mode 100644 index 0000000..6d3ec97 --- /dev/null +++ b/styleguide.style.js @@ -0,0 +1,10 @@ +module.exports = { + + // Render Area for Componenet Examples + Playground: { + preview: { + backgroundColor: "#efefef", + padding: "1em" + } + }, +} \ No newline at end of file diff --git a/styleguide.theme.js b/styleguide.theme.js new file mode 100644 index 0000000..a6723fb --- /dev/null +++ b/styleguide.theme.js @@ -0,0 +1,4 @@ +// See https://github.com/styleguidist/react-styleguidist/blob/master/src/client/styles/theme.ts +module.exports = { + maxWidth: "1400px", +} \ No newline at end of file