@fastnd/components 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { Button } from '@/components/ui/button';
|
|
3
3
|
interface FavoriteButtonProps extends Omit<React.ComponentProps<typeof Button>, 'children' | 'onToggle'> {
|
|
4
4
|
pressed: boolean;
|
|
5
|
-
|
|
5
|
+
itemName?: string;
|
|
6
|
+
projectName?: string;
|
|
6
7
|
onPressedChange?: (newState: boolean) => void;
|
|
7
8
|
}
|
|
8
9
|
declare const FavoriteButton: React.ForwardRefExoticComponent<Omit<FavoriteButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -12349,26 +12349,26 @@ function Kr({
|
|
|
12349
12349
|
);
|
|
12350
12350
|
}
|
|
12351
12351
|
const E4 = p.forwardRef(
|
|
12352
|
-
({ pressed: e,
|
|
12353
|
-
const
|
|
12354
|
-
|
|
12352
|
+
({ pressed: e, itemName: t, projectName: n, onPressedChange: r, className: o, onClick: i, ...a }, s) => {
|
|
12353
|
+
const l = t ?? n ?? "", c = (d) => {
|
|
12354
|
+
r?.(!e), i?.(d);
|
|
12355
12355
|
};
|
|
12356
12356
|
return /* @__PURE__ */ b(
|
|
12357
12357
|
Kr,
|
|
12358
12358
|
{
|
|
12359
|
-
ref:
|
|
12359
|
+
ref: s,
|
|
12360
12360
|
variant: "ghost",
|
|
12361
12361
|
size: "icon-xs",
|
|
12362
12362
|
"data-slot": "favorite-button",
|
|
12363
12363
|
"aria-pressed": e,
|
|
12364
|
-
"aria-label": e ? `Favorit entfernen: ${
|
|
12364
|
+
"aria-label": e ? `Favorit entfernen: ${l}` : `Favorit hinzufügen: ${l}`,
|
|
12365
12365
|
className: I(
|
|
12366
12366
|
"group",
|
|
12367
12367
|
!e && "hover:bg-muted",
|
|
12368
|
-
|
|
12368
|
+
o
|
|
12369
12369
|
),
|
|
12370
|
-
onClick:
|
|
12371
|
-
...
|
|
12370
|
+
onClick: c,
|
|
12371
|
+
...a,
|
|
12372
12372
|
children: /* @__PURE__ */ b(
|
|
12373
12373
|
ML,
|
|
12374
12374
|
{
|