@@ -8,19 +8,18 @@ class Card {
88 * Creates a new card instance.
99 *
1010 * @param {object } args Card arguments.
11- * @param {number?= } args.width Card width.
12- * @param {number?= } args.height Card height.
13- * @param {number?= } args.border_radius Card border radius.
14- * @param {string?= } args.customTitle Card custom title.
15- * @param {string?= } args.defaultTitle Card default title.
16- * @param {string?= } args.titlePrefixIcon Card title prefix icon.
17- * @param {object?= } args.colors Card colors arguments.
18- * @param {string } args.colors.titleColor Card title color.
19- * @param {string } args.colors.textColor Card text color.
20- * @param {string } args.colors.iconColor Card icon color.
21- * @param {string|Array } args.colors.bgColor Card background color.
22- * @param {string } args.colors.borderColor Card border color.
23- * @returns {Card } Card instance.
11+ * @param {number= } args.width Card width.
12+ * @param {number= } args.height Card height.
13+ * @param {number= } args.border_radius Card border radius.
14+ * @param {string= } args.customTitle Card custom title.
15+ * @param {string= } args.defaultTitle Card default title.
16+ * @param {string= } args.titlePrefixIcon Card title prefix icon.
17+ * @param {object } [args.colors={}] Card colors arguments.
18+ * @param {string= } args.colors.titleColor Card title color.
19+ * @param {string= } args.colors.textColor Card text color.
20+ * @param {string= } args.colors.iconColor Card icon color.
21+ * @param {string|string[]= } args.colors.bgColor Card background color.
22+ * @param {string= } args.colors.borderColor Card border color.
2423 */
2524 constructor ( {
2625 width = 100 ,
@@ -141,7 +140,7 @@ class Card {
141140 transform="translate(${ this . paddingX } , ${ this . paddingY } )"
142141 >
143142 ${ flexLayout ( {
144- items : [ this . titlePrefixIcon && prefixIcon , titleText ] ,
143+ items : [ this . titlePrefixIcon ? prefixIcon : "" , titleText ] ,
145144 gap : 25 ,
146145 } ) . join ( "" ) }
147146 </g>
0 commit comments