Skip to content

Commit

Permalink
fix(atomic): fix ipx button without label (#4318)
Browse files Browse the repository at this point in the history
[SVCC-3483](https://coveord.atlassian.net/browse/SVCC-3483)

**Problem**: Button `x` is misaligned, This is due to the fact that we
have a margin regarding the label. However the label could be undefined,
in this case we have that extra margin.

**Before** :

![Screenshot 2024-08-26 at 2 25
30 PM](https://github.com/user-attachments/assets/054ee38b-c45a-4934-a453-18a410795503)

**After**:

![Screenshot 2024-08-26 at 2 26
00 PM](https://github.com/user-attachments/assets/84a53ab3-d263-4831-b38d-1848d51b5887)

**With label (Same as before)**

![Screenshot 2024-08-26 at 2 26
38 PM](https://github.com/user-attachments/assets/d436a5e4-3093-469b-a5eb-98dacb5c7c1a)



[SVCC-3483]:
https://coveord.atlassian.net/browse/SVCC-3483?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Louis Bompart <lbompart@coveo.com>
  • Loading branch information
jelmedini and louis-bompart authored Aug 28, 2024
1 parent f7fd688 commit 4520eee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
}

&::part(button-icon) {
@apply relative mr-2 inline-block h-4 w-4 p-0 align-middle;
@apply relative inline-block h-4 w-4 p-0 align-middle;
font-size: 100%;
}

&::part(button-text) {
@apply overflow-hidden;
@apply ml-2 overflow-hidden;
}

&::part(ipx-close-icon),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class AtomicIPXButton implements InitializableComponent {
icon={this.getIcon(this.openIcon)}
></atomic-icon>
</span>
<span part="button-text">{this.label}</span>
{this.label ? <span part="button-text">{this.label}</span> : null}
</Button>
);
}
Expand Down

0 comments on commit 4520eee

Please sign in to comment.