Skip to content

Commit 3882ebe

Browse files
committed
docs: add comments for the inclusion of empty string
Signed-off-by: Akshat Patel <[email protected]>
1 parent da81ab2 commit 3882ebe

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/button/button.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class Button {
3232
/**
3333
* Sets the button type
3434
* Accepts `ButtonType` or nothing (empty string which is equivalent to "primary")
35+
* Empty string has been added as an option for Angular 16+ to resolve type errors
3536
*/
3637
@Input() cdsButton: ButtonType | "" = "primary";
3738
/**
@@ -57,7 +58,6 @@ export class Button {
5758
// a whole lot of HostBindings ... this way we don't have to touch the elementRef directly
5859
@HostBinding("class.cds--btn") baseClass = true;
5960
@HostBinding("class.cds--btn--primary") get primaryButton() {
60-
// We need to make sure cdsButton is not an empty string since input name matches selector name.
6161
return this.cdsButton === "primary" || !this.cdsButton;
6262
}
6363
@HostBinding("class.cds--btn--secondary") get secondaryButton() {

src/theme/theme.directive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class ThemeDirective implements AfterContentChecked {
3030
/**
3131
* Sets the theme for the content
3232
* Accepts `ThemeType` or nothing (empty string which is equivalent to "white")
33+
* Empty string has been added as an option for Angular 16+ to resolve type errors
3334
*/
3435
@Input() cdsTheme: ThemeType | "" = "white";
3536

0 commit comments

Comments
 (0)