summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-hints/src
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-10-04 15:32:59 +0200
committerSamy Pesse <samypesse@gmail.com>2016-10-04 15:32:59 +0200
commit87ae2481e4e6f4c6c0756ae379c8c806d95cbb68 (patch)
treeb7935d0a81202205c9f03cb8384ab19c8c6efab3 /packages/gitbook-plugin-hints/src
parentccb5dcf559ab66fede009309f2895a9da56cc116 (diff)
downloadgitbook-87ae2481e4e6f4c6c0756ae379c8c806d95cbb68.zip
gitbook-87ae2481e4e6f4c6c0756ae379c8c806d95cbb68.tar.gz
gitbook-87ae2481e4e6f4c6c0756ae379c8c806d95cbb68.tar.bz2
Add style for plugin hint
Diffstat (limited to 'packages/gitbook-plugin-hints/src')
-rw-r--r--packages/gitbook-plugin-hints/src/index.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/gitbook-plugin-hints/src/index.js b/packages/gitbook-plugin-hints/src/index.js
index be29f1b..2ee8a1f 100644
--- a/packages/gitbook-plugin-hints/src/index.js
+++ b/packages/gitbook-plugin-hints/src/index.js
@@ -3,8 +3,9 @@ const GitBook = require('gitbook-core');
const { React } = GitBook;
const STYLE_TO_ICON = {
- info: 'info',
+ info: 'info-circle',
tip: 'question',
+ success: 'check-circle',
danger: 'exclamation-circle',
warning: 'exclamation-triangle'
};
@@ -18,14 +19,18 @@ const HintAlert = React.createClass({
render() {
const { children, style, icon } = this.props;
- const className = classNames('HintAlert', 'alert', `alert-${style}`);
+ const className = classNames(
+ 'HintAlert', `HintAlert-Style-${style}`,
+ 'alert', `alert-${style}`
+ );
return (
<div className={className}>
- <div className="HintAlert/Icon">
+ <GitBook.ImportCSS href="gitbook/hints/plugin.css" />
+ <div className="HintAlert-Icon">
<GitBook.Icon id={icon || STYLE_TO_ICON[style]} />
</div>
- <div className="HintAlert/Content">
+ <div className="HintAlert-Content">
{children}
</div>
</div>