From ff236036659e69785f632ebbd8425a43ad2ec6ab Mon Sep 17 00:00:00 2001 From: Clay Diffrient Date: Sat, 10 Dec 2016 23:36:26 -0700 Subject: [PATCH] Move documentation site to GitBook This moves our documentation to being generated using GitBook. Examples are run as embedded CodePen snippets. This isn't ideal, but it works. closes #270 closes #263 closes #258 --- README.md | 1 - book.json | 31 + docs/README.md | 85 + docs/SUMMARY.md | 19 + docs/examples/css_classes.md | 7 + docs/examples/global_overrides.md | 5 + docs/examples/inline_styles.md | 5 + docs/examples/minimal.md | 5 + docs/examples/on_request_close.md | 7 + docs/examples/set_app_element.md | 7 + .../examples/should_close_on_overlay_click.md | 5 + docs/styles/README.md | 30 + docs/styles/classes.md | 5 + docs/styles/defaults.md | 3 + docs/testing/README.md | 6 + package.json | 12 +- yarn.lock | 5185 +++++++++++++++++ 17 files changed, 5416 insertions(+), 2 deletions(-) create mode 100644 book.json create mode 100644 docs/README.md create mode 100644 docs/SUMMARY.md create mode 100644 docs/examples/css_classes.md create mode 100644 docs/examples/global_overrides.md create mode 100644 docs/examples/inline_styles.md create mode 100644 docs/examples/minimal.md create mode 100644 docs/examples/on_request_close.md create mode 100644 docs/examples/set_app_element.md create mode 100644 docs/examples/should_close_on_overlay_click.md create mode 100644 docs/styles/README.md create mode 100644 docs/styles/classes.md create mode 100644 docs/styles/defaults.md create mode 100644 docs/testing/README.md create mode 100644 yarn.lock diff --git a/README.md b/README.md index cd12e7ba..1cc22883 100644 --- a/README.md +++ b/README.md @@ -224,4 +224,3 @@ pass the 'shouldCloseOnOverlayClick' prop with 'false' value. # Demos * http://reactjs.github.io/react-modal/ -* http://reactjs.github.io/react-modal/bootstrap diff --git a/book.json b/book.json new file mode 100644 index 00000000..0d242fbe --- /dev/null +++ b/book.json @@ -0,0 +1,31 @@ +{ + "gitbook": ">=3.2.2", + "title": "react-modal", + "root": "./docs", + "plugins": [ + "codepen", + "edit-link", + "prism", + "-highlight", + "anchorjs", + "github" + ], + "pluginsConfig": { + "codepen": { + "height": 1000, + "defaultTab": "js" + }, + "edit-link": { + "base": "https://github.com/reactjs/react-modal/tree/master/docs", + "label": "Edit This Page" + }, + "prism": { + "css": [ + "prismjs/themes/prism-tomorrow.css" + ] + }, + "github": { + "url": "https://github.com/reactjs/react-modal" + } + } +} diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..6a760a52 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,85 @@ +# react-modal + +> Accessible modal dialog component for React.JS + +We maintain that accessibility is a key component of any modern web application. As such, we have created this modal in such a way that it fulfills the accessibility requirements of the modern web. We seek to keep the focus on accessibility while providing a functional, capable modal component for general use. + +## General Usage + +The following is an example of using react-modal specifying all the possible props and options: + +```js +import ReactModal from 'react-modal'; + +