Skip to content

Commit f867641

Browse files
alexandr-garbuzovqwerty541
authored andcommitted
fix: resolve vscode type errors inside card class (anuraghazra#4592)
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
1 parent 8eb5f91 commit f867641

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

src/common/Card.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,18 @@ class Card {
99
* Creates a new card instance.
1010
*
1111
* @param {object} args Card arguments.
12-
* @param {number?=} args.width Card width.
13-
* @param {number?=} args.height Card height.
14-
* @param {number?=} args.border_radius Card border radius.
15-
* @param {string?=} args.customTitle Card custom title.
16-
* @param {string?=} args.defaultTitle Card default title.
17-
* @param {string?=} args.titlePrefixIcon Card title prefix icon.
18-
* @param {object?=} args.colors Card colors arguments.
19-
* @param {string} args.colors.titleColor Card title color.
20-
* @param {string} args.colors.textColor Card text color.
21-
* @param {string} args.colors.iconColor Card icon color.
22-
* @param {string|Array} args.colors.bgColor Card background color.
23-
* @param {string} args.colors.borderColor Card border color.
24-
* @returns {Card} Card instance.
12+
* @param {number=} args.width Card width.
13+
* @param {number=} args.height Card height.
14+
* @param {number=} args.border_radius Card border radius.
15+
* @param {string=} args.customTitle Card custom title.
16+
* @param {string=} args.defaultTitle Card default title.
17+
* @param {string=} args.titlePrefixIcon Card title prefix icon.
18+
* @param {object} [args.colors={}] Card colors arguments.
19+
* @param {string=} args.colors.titleColor Card title color.
20+
* @param {string=} args.colors.textColor Card text color.
21+
* @param {string=} args.colors.iconColor Card icon color.
22+
* @param {string|string[]=} args.colors.bgColor Card background color.
23+
* @param {string=} args.colors.borderColor Card border color.
2524
*/
2625
constructor({
2726
width = 100,
@@ -142,7 +141,7 @@ class Card {
142141
transform="translate(${this.paddingX}, ${this.paddingY})"
143142
>
144143
${flexLayout({
145-
items: [this.titlePrefixIcon && prefixIcon, titleText],
144+
items: [this.titlePrefixIcon ? prefixIcon : "", titleText],
146145
gap: 25,
147146
}).join("")}
148147
</g>

0 commit comments

Comments
 (0)