Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap 5 - The future #39

Closed
Script47 opened this issue Sep 2, 2021 · 1 comment
Closed

Bootstrap 5 - The future #39

Script47 opened this issue Sep 2, 2021 · 1 comment

Comments

@Script47
Copy link
Owner

Script47 commented Sep 2, 2021

Folks,

It's been a minute.

I've begun work on Bootstrap 5 support. The intention for this is to branch out to other components too (e.g. modals, toasts, snacks) as such, I've made it a separate repository which you can find over here, though, nothing is in the repo, work is well underway locally:

/***
 * Overridable globals
 ***/
Bs5Utils.defaults.toasts.position = 'top-right'; // top-left, top-center, top-right, middle-left, middle-center, middle-right, bottom-left, bottom-center, bottom-right
Bs5Utils.defaults.toasts.container = 'toast-container';

const bs5Utils = new Bs5Utils();

bs5Utils.Snack.show('info', 'Hello World!');
bs5Utils.Snack.show('success', 'Hello World!');
bs5Utils.Snack.show('warning', 'Hello World!');
bs5Utils.Snack.show('error', 'Hello World!');

// A neater way to register your own styles to components
bs5Utils.Snack.addStyle('pink-purple', ['text-purple', 'bg-pink']);

// Now use the newly registered style
// bs5Utils.Snack.show(type, title, delay = 0, dismissible = true)
bs5Utils.Snack.show('pink-purple', 'Hello Custom Style!', false, false);

Example:

image

Feel free to make feature requests in the new repo.

@Script47 Script47 pinned this issue Sep 2, 2021
@Script47
Copy link
Owner Author

Script47 commented Sep 5, 2021

v1.0.0 has been released: https://github.com/Script47/bs5-utils

@Script47 Script47 closed this as completed Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant