gd-bs 6.2.2 → 6.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.2.2",
3
+ "version": "6.2.4",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -113,12 +113,12 @@ class _Button extends Base<IButtonProps> implements IButton {
113
113
 
114
114
  // Set the icon if it exists
115
115
  if (this.props.iconType) {
116
+ // Update the styling of the button
117
+ this.el.classList.add("btn-icon");
118
+
116
119
  if (typeof (this.props.iconType) === "function") {
117
120
  // Append the icon
118
121
  this.el.prepend((this.props.iconType as Function)(this.props.iconSize, this.props.iconSize, this.props.iconClassName));
119
-
120
- // Update the styling of the button
121
- this.el.classList.add("btn-icon");
122
122
  }
123
123
  // Else, it's an element
124
124
  else if (typeof (this.props.iconType === "object")) {
@@ -90,7 +90,7 @@ export interface IButtonProps extends IBaseProps<IButton> {
90
90
  href?: string;
91
91
  iconClassName?: string;
92
92
  iconSize?: number;
93
- iconType?: HTMLElement | Function;
93
+ iconType?: SVGImageElement | Function;
94
94
  id?: string;
95
95
  isBlock?: boolean;
96
96
  isDisabled?: boolean;
@@ -108,7 +108,7 @@ export interface IDropdownItem {
108
108
  href?: string;
109
109
  iconClassName?: string;
110
110
  iconSize?: number;
111
- iconType?: HTMLElement | Function;
111
+ iconType?: SVGImageElement | Function;
112
112
  isDisabled?: boolean;
113
113
  isDivider?: boolean;
114
114
  isHeader?: boolean;
@@ -55,7 +55,7 @@ export interface IIconLinkProps<T = HTMLElement> extends IBaseProps<IIconLink> {
55
55
  href?: string;
56
56
  iconClassName?: string;
57
57
  iconSize?: number;
58
- iconType?: HTMLElement | Function;
58
+ iconType?: SVGImageElement | Function;
59
59
  type?: number;
60
60
  }
61
61
 
@@ -124,7 +124,7 @@ export interface INavbarItem {
124
124
  href?: string;
125
125
  iconClassName?: string;
126
126
  iconSize?: number;
127
- iconType?: HTMLElement | Function;
127
+ iconType?: SVGImageElement | Function;
128
128
  isActive?: boolean;
129
129
  isButton?: boolean;
130
130
  isDisabled?: boolean;