gd-bs 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/popover/index.js +3 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +2 -0
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/popover/index.ts +4 -2
- package/src/components/popover/types.d.ts +2 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { ITippyProps } from "../types";
|
|
|
3
3
|
import { IPopover, IPopoverProps } from "./types";
|
|
4
4
|
import { Button } from "../button";
|
|
5
5
|
import { Base } from "../base";
|
|
6
|
-
import { appendContent } from "../common";
|
|
6
|
+
import { appendContent, setClassNames } from "../common";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Popover Types
|
|
@@ -213,9 +213,11 @@ class _Popover extends Base<IPopoverProps> implements IPopover {
|
|
|
213
213
|
// Create the popover content element
|
|
214
214
|
this._elContent = document.createElement("div") as HTMLDivElement;
|
|
215
215
|
this._elContent.classList.add("popover-content");
|
|
216
|
-
this._elContent.innerHTML = '<
|
|
216
|
+
this._elContent.innerHTML = '<div class="popover-header"></div><div class="popover-body"></div>';
|
|
217
217
|
appendContent(this._elContent.querySelector(".popover-header"), this.props.title);
|
|
218
|
+
setClassNames(this._elContent.querySelector(".popover-header"), this.props.classNameHeader);
|
|
218
219
|
appendContent(this._elContent.querySelector(".popover-body"), options.content as any);
|
|
220
|
+
setClassNames(this._elContent.querySelector(".popover-body"), this.props.classNameBody);
|
|
219
221
|
options.content = this._elContent;
|
|
220
222
|
|
|
221
223
|
// Set the on create event
|
|
@@ -96,6 +96,8 @@ export interface IPopover {
|
|
|
96
96
|
*/
|
|
97
97
|
export interface IPopoverProps extends IBaseProps<IPopover> {
|
|
98
98
|
btnProps?: IButtonProps;
|
|
99
|
+
classNameBody?: string;
|
|
100
|
+
classNameHeader?: string;
|
|
99
101
|
isDismissible?: boolean;
|
|
100
102
|
options?: ITippyProps;
|
|
101
103
|
placement?: number;
|