| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
🪟 Windows-like dialogue boxes for your website
Install the NPM package using your package manager.
# npm
npm install @skwalexe/winmb
# yarn
yarn add @skwalexe/winmbThen import the library.
// For CommonJS
const WinMB = require('@skwalexe/winmb')
// For ES Modules
import WinMB from '@skwalexe/winmb'If you use this method, the library will be available globally as WinMB.
<script src="https://cdn.jsdelivr.net/npm/@skwalexe/winmb@0.1.4/dist/winmb.umd.js"></script>This library exports a WinMB class which acccepts the following parameters:
const wmbEngine = WinMB('https://cdn.jsdelivr.net/gh/SkwalExe/WinMB.js@0.1.4/src/assets/')Once you instanciated the WinMB class, it exposes the follwing methods:
This method will remove all the dialogue boxes from the page. It doesn't use any parameters and doesn't return anything.
wmbEngine.removeAll()This method will create a new dialogue box and display it on the page. All the parameters will be demonstrated later on. It accepts the following parameters:
This function returns a Promise() which will resolve when a button is clicked or when the message box is closed. The return value will be the clicked button's corresponding value (see buttons), and false if the box was dismissed with the close button.
Please, open an issue if you have any suggestion or if you found a bug. I will try to fix it as soon as possible.
This is a simple library that can create Windows message boxes on a web page. It uses the following technologies for the development process and for the build pipeline:
This library uses pnpm as a package manager. You can install it with:
sudo npm install -g pnpmgit clone https://github.com/YOUR_USERNAME/WinMB.js
cd ./WinMB.jspnpm installpnpm run serveUnreferenced files are just not important.
Configuration Files: ⚙
Source: 🔢
Builds: 👷
Other: 📄
If you'd like to contribute, please open an empty pull request and provide an explanation of your proposed changes. Once I approve it, you can begin your work. It's always disheartening to reject a pull request after someone has invested a lot of time and effort into it. 😿
git checkout -b my-new-featurepnpm run lint:fix # check for linting errors
pnpm run check-types # check for type errors
pnpm run format # comply with foramtting rulesAfter that, add your changes to CHANGELOG.md and update the README if needed.
Do not increment the NPM package version yourself, the maintainer will do it.
Then, you can commit your work and push to your fork.
git add --all
git commit -m "Added a new feature"
git push -u origin my-new-featurewmbEngine.show("I am a title", "I am a message")wmbEngine.show("skwal.net", "Message box types", "info")wmbEngine.show("skwal.net", "Message box types", "error")wmbEngine.show("skwal.net", "Message box types", "warning")wmbEngine.show("skwal.net", "Buttons", "info", [{text: "Hello", value: true}, {text: "World", value: false}])wmbEngine.show("skwal.net", "Default position", "info", [{text: "Hello", value: true}], "default")wmbEngine.show("skwal.net", "Random position", "warning", [{text: "Hello", value: true}], "random")| Back | FazBrowse Home | New Git URL |