@purpurds/tooltip 4.4.0 → 4.5.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/tooltip",
3
- "version": "4.4.0",
3
+ "version": "4.5.1",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/tooltip.cjs.js",
6
6
  "types": "./dist/tooltip.d.ts",
@@ -16,10 +16,11 @@
16
16
  "dependencies": {
17
17
  "@radix-ui/react-tooltip": "~1.0.7",
18
18
  "classnames": "~2.5.0",
19
- "@purpurds/icon": "4.4.0",
20
- "@purpurds/button": "4.4.0",
21
- "@purpurds/paragraph": "4.4.0",
22
- "@purpurds/tokens": "4.4.0"
19
+ "@purpurds/paragraph": "4.5.1",
20
+ "@purpurds/button": "4.5.1",
21
+ "@purpurds/icon": "4.5.1",
22
+ "@purpurds/tokens": "4.5.1",
23
+ "@purpurds/action": "4.5.1"
23
24
  },
24
25
  "devDependencies": {
25
26
  "@rushstack/eslint-patch": "~1.10.0",
package/src/tooltip.tsx CHANGED
@@ -1,4 +1,5 @@
1
1
  import React, { Children, ForwardedRef, forwardRef, ReactNode, useState } from "react";
2
+ import { SIZE, Size } from "@purpurds/action";
2
3
  import { Button, BUTTON_VARIANT } from "@purpurds/button";
3
4
  import { IconInfo } from "@purpurds/icon";
4
5
  import { Paragraph, ParagraphVariant } from "@purpurds/paragraph";
@@ -33,6 +34,7 @@ export type TooltipAlign = (typeof TOOLTIP_ALIGN)[keyof typeof TOOLTIP_ALIGN];
33
34
 
34
35
  export type TooltipProps = {
35
36
  align?: TooltipAlign;
37
+ buttonSize?: Size;
36
38
  children: ReactNode;
37
39
  variant?: TooltipVariant;
38
40
  position?: TooltipPosition;
@@ -54,6 +56,7 @@ export const Tooltip = forwardRef(
54
56
  (
55
57
  {
56
58
  ["data-testid"]: dataTestId,
59
+ buttonSize = SIZE.MD,
57
60
  children,
58
61
  className,
59
62
  contentClassName,
@@ -81,6 +84,7 @@ export const Tooltip = forwardRef(
81
84
  variant={ButtonVariants[variant]}
82
85
  iconOnly
83
86
  data-testid={`${dataTestId}-trigger-button`}
87
+ size={buttonSize}
84
88
  >
85
89
  <IconInfo size="md" />
86
90
  </Button>