@rovula/ui 0.0.67 → 0.0.68

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.
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { ToastActionElement, ToastProps } from "./Toast";
3
+ import { IconProps } from "../Icon/Icon";
3
4
  type ToasterToast = ToastProps & {
4
5
  id: string;
5
6
  title?: React.ReactNode;
@@ -7,6 +8,8 @@ type ToasterToast = ToastProps & {
7
8
  action?: ToastActionElement;
8
9
  contentMode?: "vertical" | "horizontal";
9
10
  onClose?: () => void;
11
+ iconProps?: IconProps;
12
+ renderIcon?: () => React.ReactElement;
10
13
  };
11
14
  type ToasterPosition = "top-center" | "top-left" | "top-right" | "bottom-center" | "bottom-left" | "bottom-right" | undefined;
12
15
  declare const actionTypes: {
package/dist/index.d.ts CHANGED
@@ -581,6 +581,8 @@ type ToasterToast = ToastProps & {
581
581
  action?: ToastActionElement;
582
582
  contentMode?: "vertical" | "horizontal";
583
583
  onClose?: () => void;
584
+ iconProps?: IconProps;
585
+ renderIcon?: () => React.ReactElement;
584
586
  };
585
587
  type ToasterPosition = "top-center" | "top-left" | "top-right" | "bottom-center" | "bottom-left" | "bottom-right" | undefined;
586
588
  declare const actionTypes: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.0.67",
3
+ "version": "0.0.68",
4
4
  "main": "dist/cjs/bundle.js",
5
5
  "module": "dist/esm/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -93,7 +93,7 @@ const ToastDescription = React.forwardRef<
93
93
  >(({ className, ...props }, ref) => (
94
94
  <ToastPrimitives.Description
95
95
  ref={ref}
96
- className={cn("typography-subtitile5 text-input-default-tex", className)}
96
+ className={cn("typography-subtitile5 text-input-default-text", className)}
97
97
  {...props}
98
98
  />
99
99
  ));
@@ -43,6 +43,8 @@ export function Toaster({
43
43
  description,
44
44
  action,
45
45
  contentMode = "horizontal",
46
+ iconProps,
47
+ renderIcon,
46
48
  ...props
47
49
  }) {
48
50
  return (
@@ -53,7 +55,16 @@ export function Toaster({
53
55
  iconWrapperClassName
54
56
  )}
55
57
  >
56
- <Icon type="heroicons" name="check-circle" className="size-6" />
58
+ {renderIcon ? (
59
+ renderIcon?.()
60
+ ) : (
61
+ <Icon
62
+ type="heroicons"
63
+ name="check-circle"
64
+ className="size-6"
65
+ {...iconProps}
66
+ />
67
+ )}
57
68
  </div>
58
69
  <div
59
70
  className={cn(
@@ -3,6 +3,7 @@
3
3
  // Inspired by react-hot-toast library
4
4
  import * as React from "react";
5
5
  import { ToastActionElement, ToastProps } from "./Toast";
6
+ import { IconProps } from "../Icon/Icon";
6
7
 
7
8
  const TOAST_LIMIT = 1;
8
9
  const TOAST_REMOVE_DELAY = 3000;
@@ -14,6 +15,8 @@ type ToasterToast = ToastProps & {
14
15
  action?: ToastActionElement;
15
16
  contentMode?: "vertical" | "horizontal";
16
17
  onClose?: () => void;
18
+ iconProps?: IconProps;
19
+ renderIcon?: () => React.ReactElement;
17
20
  };
18
21
 
19
22
  type ToasterPosition =