├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── favicon.ico
├── index.html
├── package-lock.json
├── package.json
├── src
└── bootstrap-show-notification.js
└── test
├── Test.js
└── index.html
/.gitattributes:
--------------------------------------------------------------------------------
1 | src/bootstrap-show-notification.js linguist-vendored=false
2 | index.html linguist-documentation
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /.idea
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Stefan Haack
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # bootstrap-show-notification
2 |
3 | > This component is Bootstrap 4 only. For a Bootstrap 5 compatible
4 | > component with similar functionality, see [bootstrap-show-toast](https://github.com/shaack/bootstrap-show-toast).
5 |
6 | A jQuery plugin wrapper around Bootstrap 4 Alerts, to show them as toasts (also called notifications) dynamically from JavaScript.
7 |
8 | 
9 |
10 | =>
11 | - Responsive and mobile friendly
12 | - Needs no extra CSS
13 |
14 | ## Try it
15 |
16 | - [Demo Page](https://shaack.com/projekte/bootstrap-show-notification/)
17 |
18 | ## Installation
19 |
20 | - [npm package](https://www.npmjs.com/package/bootstrap-show-notification)
21 |
22 | ```sh
23 | npm install bootstrap-show-notification
24 | ```
25 |
26 | ## Usage
27 |
28 | ```html
29 |
30 |
54 | ```
55 |
56 | ## Props (defaults)
57 |
58 | ```js
59 | this.props = {
60 | body: "", // the text, shown
61 | type: "primary", // the appearance
62 | duration: 5500, // duration till auto-hide, set to `0` to disable auto-hide
63 | maxWidth: "520px", // the notification maxWidth
64 | shadow: "0 2px 6px rgba(0,0,0,0.2)", // the box-shadow
65 | zIndex: 100,
66 | margin: "1rem", // the margin (above maxWidth)
67 | direction: "prepend" // or "append", the stack direction
68 | }
69 | ```
70 |
71 | ## Documentation
72 |
73 | - [Repository and documentation](https://github.com/shaack/bootstrap-show-notification)
74 |
75 | ## More Bootstrap extensions
76 |
77 | Check out my [further Bootstrap extensions](https://shaack.com/en/open-source-components)
78 |
--------------------------------------------------------------------------------
/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shaack/bootstrap-show-notification/a16790bc693e91457c61b908d19b58590a11d7a0/favicon.ico
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |