diff options
Diffstat (limited to 'packages/gitbook-plugin-hints/src')
-rw-r--r-- | packages/gitbook-plugin-hints/src/index.js | 13 |
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> |