Verified Commit bd4422a3 authored by Cromefire_'s avatar Cromefire_

Added basic docs far alert

Signed-off-by: default avatarCromefire_ <[email protected]>
parent 223f21c4
......@@ -150,3 +150,4 @@ typings/
.serverless
/esm
/docs/_build
......@@ -3,6 +3,7 @@
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/docs/_build" />
<excludeFolder url="file://$MODULE_DIR$/esm" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
......
......@@ -6,6 +6,8 @@
<entryData>
<resourceRoots>
<path value="file://$PROJECT_DIR$/ts" />
<path value="file://$PROJECT_DIR$/docs/_static" />
<path value="file://$PROJECT_DIR$/docs/_templates" />
</resourceRoots>
</entryData>
</entry>
......
Alerts
======
Alerts are good to use for notifications for example:
.. raw:: html
<div class="alert alert-warning" role="alert">
<h4 class="alert-heading">Warning</h4>
Your account information might have been stolen.
<a class="alert-link" href="#" onclick="event.preventDefault()">More Information</a>
</div>
.. code-block:: html
:linenos:
<Alert color={"warning"}>
<Heading tag={"h4"}>Warning</Heading>
Your account information might have been stolen.
<Link href="#">More Information</Link>
</Alert>
Props
-----
color : Color_
Bootstrap color schema (see Color_)
dismissible : ``boolean`` | ``"animated"``
Whether the the alert has an button to allow the user dismissing it.
.. note::
You have to handle the dismiss action yourself through ``onDismiss``.
onDismiss : () => void
Function called when the user clicks the dismiss button.
.. _Color: ../../Misc/Types#color
Components
==========
.. toctree::
:maxdepth: 1
:caption: PreactBoot consists of multiple components that be be used individually:
:glob:
Alerts/*
Types
=====
Basic (TypeScript) types used in PreactBoot
Color
-----
Containing file: ``util/bootstrap``
.. code-block:: typescript
"primary" | "secondary" | "success" | "danger" | "warning" | "info" | "dark"
Misc
====
Misc stuff like types and additional information.
.. toctree::
:maxdepth: 1
:caption: PreactBoot consists of multiple components that be be used individually:
:glob:
Types/*
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,7 +12,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
from os import environ
# import sys
# sys.path.insert(0, os.path.abspath('.'))
......@@ -31,6 +31,10 @@ release = '1.0.0-alpha3'
# -- General configuration ---------------------------------------------------
def setup(app):
app.add_stylesheet('css/reboot.min.css')
app.add_stylesheet('css/bootstrap.min.css')
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
......@@ -75,7 +79,10 @@ pygments_style = None
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
if "READTHEDOCS" in environ:
html_theme = 'default'
else:
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
......@@ -179,4 +186,4 @@ epub_exclude_files = ['search.html']
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
\ No newline at end of file
todo_include_todos = False
\ No newline at end of file
.. PreactBoot documentation master file, created by
sphinx-quickstart on Sat Sep 15 15:40:55 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to PreactBoot's documentation!
======================================
Simple, declarative `Bootstrap 4 <https://getbootstrap.com/docs/>`_ components for use with `preact <https://preactjs.com>`_.
.. toctree::
:maxdepth: 2
:caption: Contents:
:glob:
Components/*
Misc/*
Indices and tables
==================
Index
-----
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
pygments==2.2.0
sphinx==1.8.0
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