mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Fix options.width definition in bootstrap-growl-ifightcrime * take review into account: keep width attribute as optional
37 lines
854 B
TypeScript
37 lines
854 B
TypeScript
// basic usage
|
|
$(document).ready(() => {
|
|
$.bootstrapGrowl('Message to show in alert');
|
|
});
|
|
|
|
// with options example
|
|
let offsetOptions: BootstrapGrowlIfightcrime.OffsetOption = {
|
|
from: 'top',
|
|
amount: 20
|
|
};
|
|
|
|
let options: BootstrapGrowlIfightcrime.Options = {
|
|
ele: 'body',
|
|
type: 'info',
|
|
offset: offsetOptions,
|
|
align: 'right',
|
|
delay: 4000,
|
|
allow_dismiss: true,
|
|
stackup_spacing: 10
|
|
};
|
|
|
|
$(document).ready(() => {
|
|
$.bootstrapGrowl('Alert with options', options);
|
|
|
|
const optionsWidthAuto: BootstrapGrowlIfightcrime.Options = {
|
|
...options,
|
|
width: 'auto'
|
|
};
|
|
$.bootstrapGrowl('Alert with options, width=auto', optionsWidthAuto);
|
|
|
|
const optionsWidthAsNumber = {
|
|
...options,
|
|
width: 120
|
|
};
|
|
$.bootstrapGrowl('Alert with options, width=120', optionsWidthAsNumber);
|
|
});
|