Skip to content

Commit c5ea18d

Browse files
committedMar 14, 2022
refactor(ColDirective): simplify cCol for all breakpoints (xs alias)
1 parent 831e597 commit c5ea18d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎projects/coreui-angular/src/lib/grid/col.directive.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { BreakpointInfix } from '../coreui.types';
99
})
1010
export class ColDirective implements ICol {
1111

12+
static ngAcceptInputType_cCol: (BooleanInput | NumberInput);
1213
static ngAcceptInputType_xs: (BooleanInput | NumberInput);
1314
static ngAcceptInputType_sm: (BooleanInput | NumberInput);
1415
static ngAcceptInputType_md: (BooleanInput | NumberInput);
@@ -21,6 +22,10 @@ export class ColDirective implements ICol {
2122
* @type { 'auto' | number | boolean }
2223
*/
2324
@Input()
25+
set cCol(value: (BooleanInput | NumberInput)) {
26+
this.xs = this.xs || this.coerceInput(value);
27+
}
28+
@Input()
2429
set xs(value) {
2530
this._xs = this.coerceInput(value);
2631
}

0 commit comments

Comments
 (0)
Please sign in to comment.