Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sparkle] Fixed notification display #9550

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sparkle/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sparkle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dust-tt/sparkle",
"version": "0.2.345",
"version": "0.2.346",
"scripts": {
"build": "rm -rf dist && npm run tailwind && npm run build:esm && npm run build:cjs",
"tailwind": "tailwindcss -i ./src/styles/tailwind.css -o dist/sparkle.css",
Expand Down
9 changes: 2 additions & 7 deletions sparkle/src/components/Notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import React, { useEffect } from "react";
import { createPortal } from "react-dom";

import { IconButton } from "@sparkle/components/IconButton";

Check failure on line 5 in sparkle/src/components/Notification.tsx

View workflow job for this annotation

GitHub Actions / check-eslint

'IconButton' is defined but never used
import { CheckCircleIcon, XCircleIcon, XMarkIcon } from "@sparkle/icons";

Check failure on line 6 in sparkle/src/components/Notification.tsx

View workflow job for this annotation

GitHub Actions / check-eslint

'XMarkIcon' is defined but never used
import { classNames } from "@sparkle/lib/utils";

import { Icon } from "./Icon";
Expand Down Expand Up @@ -40,6 +40,7 @@
"s-pointer-events-auto s-flex s-max-w-[400px] s-flex-row s-items-center s-gap-2 s-rounded-xl s-border s-border-structure-100 s-bg-structure-0 s-p-4 s-shadow-xl",
className
)}
onClick={onClick}
>
{variant === "success" ? (
<Icon
Expand All @@ -59,20 +60,14 @@
<div className="s-flex s-grow s-flex-row s-gap-6">
<div
className={classNames(
"s-text-md s-line-clamp-1 s-grow s-font-semibold",
"s-text-md s-line-clamp-1 s-h-6 s-grow s-font-semibold",
variant === "success"
? "s-text-success-500"
: "s-text-warning-500"
)}
>
{title || variant}
</div>
<IconButton
icon={XMarkIcon}
size="sm"
variant="ghost"
onClick={onClick}
/>
</div>
{description && (
<div className="s-line-clamp-3 s-pr-2 s-text-sm s-font-normal s-text-element-700">
Expand Down
Loading