Eduzz Apps Toolbar
Toolbar cross-application
How to use
In Browser
(function (d, l, c) {
var s = d.createElement('script');
s.async = true;
s.src = l;
s.onload = c;
d.body.append(s);
})(document, 'https://unpkg.com/@eduzz/apps-toolbar@^1.4.28/build/widget.js', function () {
var toolbar = window.EduzzAppsToolbar({
application: 'nutror',
show: true
});
toolbar.show();
toolbar.hide();
});
Via npm
import EduzzAppsToolbar from '@eduzz/apps-toolbar';
import { IUser } from 'interfaces/models/user';
const promiseToolbar = EduzzAppsToolbar({
application: 'nutror',
show: true
});
export async function show(user: IUser) {
const toolbar = await promiseToolbar;
toolbar.show();
}
export async function clearUser() {
const toolbar = await promiseToolbar;
toolbar.hide();
}