gd-bs 6.6.48 → 6.6.49
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/cardGroup/index.js +11 -4
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +1 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/cardGroup/index.ts +10 -4
- package/src/components/cardGroup/types.d.ts +1 -1
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ class _CardGroup extends Base<ICardGroupProps> implements ICardGroup {
|
|
|
25
25
|
let isGrid = false;
|
|
26
26
|
|
|
27
27
|
// See if we are rendering columns
|
|
28
|
-
if (typeof (this.props.colSize) === "number") {
|
|
28
|
+
if (typeof (this.props.colSize) === "number" || this.props.colSize == "auto") {
|
|
29
29
|
// Update the flag
|
|
30
30
|
isGrid = true;
|
|
31
31
|
|
|
@@ -33,9 +33,15 @@ class _CardGroup extends Base<ICardGroupProps> implements ICardGroup {
|
|
|
33
33
|
(this.el as HTMLElement).classList.remove("card-group");
|
|
34
34
|
(this.el as HTMLElement).classList.add("row");
|
|
35
35
|
|
|
36
|
-
//
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
// See if the column size is a number
|
|
37
|
+
if (this.props.colSize == "auto") {
|
|
38
|
+
// Set the column to auto size
|
|
39
|
+
(this.el as HTMLElement).classList.add("row-cols-auto");
|
|
40
|
+
} else {
|
|
41
|
+
// Determine the column class to use
|
|
42
|
+
let colSize = this.props.colSize > 0 && this.props.colSize <= 12 ? this.props.colSize : 4;
|
|
43
|
+
(this.el as HTMLElement).classList.add("row-cols-" + colSize);
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
// Parse the cards
|
|
@@ -107,7 +107,7 @@ export interface ICardGroup {
|
|
|
107
107
|
*/
|
|
108
108
|
export interface ICardGroupProps extends IBaseProps<ICardGroup> {
|
|
109
109
|
cards?: Array<ICardProps>;
|
|
110
|
-
colSize?: number;
|
|
110
|
+
colSize?: number | string;
|
|
111
111
|
onCardRender?: (el?: HTMLElement, props?: ICardProps) => void;
|
|
112
112
|
onColRender?: (el?: HTMLElement, props?: ICardProps) => void;
|
|
113
113
|
onRender?: (el?: HTMLElement, props?: ICardGroupProps) => void;
|