Skip to content

Commit

Permalink
fix: toast zIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanqi9675 committed Dec 8, 2023
1 parent b618f20 commit 1119c67
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions packages/quarkd/src/toast/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,17 @@ class QuarkToast extends QuarkElement {
</quark-overlay>
);
};
renderOther = () => (
<div
class="quark-toast"
ref={this.toastRef}
style={{ zIndex: this.zIndex }}
>
{this.type !== "text" && this.renderIcon()}
<slot>{this.content}</slot>
</div>
);
renderOther = () => {
if (this.zIndex) {
this.style.zIndex = `${this.zIndex}`;
}
return (
<div class="quark-toast" ref={this.toastRef}>
{this.type !== "text" && this.renderIcon()}
<slot>{this.content}</slot>
</div>
);
};
render() {
return (
<Fragment>
Expand Down

0 comments on commit 1119c67

Please sign in to comment.