Skip to content

Commit 67cbc26

Browse files
Patricio AlbizuPatricio Albizu
authored andcommitted
feat: adding icon properties
1 parent 6b811a7 commit 67cbc26

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

projects/components/src/icon/icon.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ import { IconSize } from './icon-size';
1111
<mat-icon
1212
class="ht-icon"
1313
[ngClass]="this.size"
14-
[ngStyle]="{ color: this.color ? this.color : '' }"
14+
[ngStyle]="{
15+
color: this.color ? this.color : '',
16+
border: this.border ? this.border : '',
17+
borderRadius: this.borderRadius ? this.borderRadius : ''
18+
}"
1519
[attr.aria-label]="this.labelToUse"
1620
[htTooltip]="this.showTooltip ? this.labelToUse : undefined"
1721
[fontSet]="this.fontSet"
@@ -27,6 +31,12 @@ export class IconComponent implements OnChanges {
2731
@Input()
2832
public size: IconSize = IconSize.Medium;
2933

34+
@Input()
35+
public border?: string;
36+
37+
@Input()
38+
public borderRadius?: string;
39+
3040
@Input()
3141
public label?: string;
3242

projects/components/src/select/select-option.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ export class SelectOptionComponent<V> implements OnChanges, SelectOption<V> {
2727
@Input()
2828
public iconColor?: string;
2929

30+
@Input()
31+
public iconBorder?: string;
32+
33+
@Input()
34+
public iconBorderRadius?: string;
35+
3036
@Input()
3137
public disabled?: boolean;
3238

projects/components/src/select/select.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ import { SelectSize } from './select-size';
6161
[icon]="this.getPrefixIcon(selected)"
6262
[size]="this.iconSize"
6363
[color]="selected?.iconColor"
64+
[border]="selected?.iconBorder"
65+
[borderRadius]="selected?.iconBorderRadius"
6466
>
6567
</ht-icon>
6668
<ht-label class="trigger-label" [label]="selected?.selectedLabel || selected?.label || this.placeholder">
@@ -123,6 +125,8 @@ import { SelectSize } from './select-size';
123125
[icon]="item.icon"
124126
size="${IconSize.Small}"
125127
[color]="item.iconColor"
128+
[border]="item.iconBorder"
129+
[borderRadius]="item.iconBorderRadius"
126130
>
127131
</ht-icon>
128132
<span class="label">{{ item.label }}</span>

0 commit comments

Comments
 (0)