Skip to content

Commit ace727e

Browse files
nakulgulatibrandyscarney
authored andcommitted
fix(chip): align icon in the center
fixes #5386
1 parent 47ed69e commit ace727e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/components/chip/chip.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ $chip-button-size: 32px !default;
1515
/// @prop - Border radius of the icon in the chip
1616
$chip-icon-border-radius: 50% !default;
1717

18+
/// @prop - Text alignment of the icon in the chip
19+
$chip-icon-text-align: center !default;
20+
1821
/// @prop - Width and height of the icon in the chip
1922
$chip-icon-size: 32px !default;
2023

@@ -56,6 +59,7 @@ ion-chip ion-icon {
5659

5760
font-size: $chip-icon-font-size;
5861
line-height: $chip-icon-size;
62+
text-align: $chip-icon-text-align;
5963
}
6064

6165
ion-chip ion-avatar {

src/components/chip/test/basic/main.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,14 @@ <h2>Delete Chips</h2>
9393
</button>
9494
</ion-chip>
9595

96+
<ion-item>
97+
<ion-label>Chip Item</ion-label>
98+
<ion-chip item-right #chip1>
99+
<ion-icon name="pin" color="primary"></ion-icon>
100+
<ion-label>Default</ion-label>
101+
<button ion-button clear color="light" (click)="delete(chip1)">
102+
<ion-icon name="close-circle"></ion-icon>
103+
</button>
104+
</ion-chip>
105+
</ion-item>
96106
</ion-content>

0 commit comments

Comments
 (0)