mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
fix(bootstrap): add missing properties for v4.3 (#42867)
- `ride` option for Carousel: https://getbootstrap.com/docs/4.4/components/carousel/#carouseloptions - `popperConfig` option for Tooltip (Popover): https://getbootstrap.com/docs/4.4/components/popovers/#options - `hidePrevented` event for Modal: https://getbootstrap.com/docs/4.4/components/modal/#events Thanks!
This commit is contained in:
parent
418fbfd443
commit
62f1cec801
@@ -51,6 +51,7 @@ $("#carousel").carousel({
|
||||
keyboard: true,
|
||||
slide: false,
|
||||
pause: "hover",
|
||||
ride: 'carousel',
|
||||
wrap: true,
|
||||
touch: false,
|
||||
});
|
||||
@@ -169,6 +170,10 @@ $("#modal").modal({
|
||||
backdrop: "static",
|
||||
});
|
||||
|
||||
$("#modal").on('hidePrevented.bs.modal', e => {
|
||||
const {data, target: modal} = e;
|
||||
});
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// Popover
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -307,6 +312,9 @@ $("#tooltip").tooltip({
|
||||
img: ['src', 'alt', 'title', 'width', 'height'],
|
||||
},
|
||||
sanitizeFn: (x: string) => x.replace("<", ""),
|
||||
popperConfig: {
|
||||
placement: 'bottom',
|
||||
},
|
||||
});
|
||||
|
||||
$("#tooltip").tooltip({
|
||||
|
||||
Vendored
+15
-1
@@ -1,6 +1,7 @@
|
||||
// Type definitions for Bootstrap 4.3
|
||||
// Project: https://github.com/twbs/bootstrap/, https://getbootstrap.com
|
||||
// Definitions by: denisname <https://github.com/denisname>
|
||||
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -74,6 +75,13 @@ export interface CarouselOption {
|
||||
*/
|
||||
pause?: "hover" | false;
|
||||
|
||||
/**
|
||||
* Autoplays the carousel after the user manually cycles the first item.
|
||||
* If `carousel`, autoplays the carousel on load.
|
||||
* @default false
|
||||
*/
|
||||
ride?: 'carousel' | boolean;
|
||||
|
||||
/**
|
||||
* Whether the carousel should cycle continuously or have hard stops.
|
||||
*
|
||||
@@ -371,6 +379,12 @@ export interface TooltipOption {
|
||||
* @default null
|
||||
*/
|
||||
sanitizeFn?: null | ((input: string) => string);
|
||||
|
||||
/**
|
||||
* To change Bootstrap's default Popper.js config,
|
||||
* see {@link https://popper.js.org/docs/v1/ Popper.js's configuration}
|
||||
*/
|
||||
popperConfig?: null | object;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
@@ -449,7 +463,7 @@ export type AlertEvent = "close.bs.alert" | "closed.bs.alert";
|
||||
export type CarouselEvent = "slide.bs.carousel" | "slid.bs.carousel";
|
||||
export type CollapseEvent = "show.bs.collapse" | "shown.bs.collapse" | "hide.bs.collapse" | "hidden.bs.collapse";
|
||||
export type DropdownEvent = "show.bs.dropdown" | "shown.bs.dropdown" | "hide.bs.dropdown" | "hidden.bs.dropdown";
|
||||
export type ModalEvent = "show.bs.modal" | "shown.bs.modal" | "hide.bs.modal" | "hidden.bs.modal";
|
||||
export type ModalEvent = "show.bs.modal" | "shown.bs.modal" | "hide.bs.modal" | "hidden.bs.modal" | "hidePrevented.bs.modal";
|
||||
export type PopoverEvent = "show.bs.popover" | "shown.bs.popover" | "hide.bs.popover" | "hidden.bs.popover" | "inserted.bs.popover";
|
||||
export type ScrollspyEvent = "activate.bs.scrollspy";
|
||||
export type TapEvent = "show.bs.tab" | "shown.bs.tab" | "hide.bs.tab" | "hidden.bs.tab";
|
||||
|
||||
Reference in New Issue
Block a user