@basic-ui/material 1.0.0-alpha.38 → 1.0.0-alpha.39

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": "@basic-ui/material",
3
- "version": "1.0.0-alpha.38",
3
+ "version": "1.0.0-alpha.39",
4
4
  "description": "Accessible React Components used as building blocks for UI patterns",
5
5
  "author": "Lucas Terra <lucasterra7@gmail.com>",
6
6
  "license": "MIT",
@@ -62,5 +62,5 @@
62
62
  "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0",
63
63
  "tailwindcss": "^3.0.0"
64
64
  },
65
- "gitHead": "58116e5c2f4f369e96b5b61b382a49d017632970"
65
+ "gitHead": "03cb79969b5e93d4cfdb20c40cafd5f3bb7f33b1"
66
66
  }
@@ -17,12 +17,19 @@ export interface TooltipProps
17
17
  const BaseTooltip: FC<
18
18
  BoxProps & {
19
19
  innerAs?: ElementType<any>;
20
+ label: ReactNode;
20
21
  } & Omit<PopperProps, 'color' | 'anchorEl'>
21
22
  > = _BaseTooltip as any;
22
23
 
23
24
  export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
24
25
  function Tooltip(props, forwardedRef) {
25
- const { placement = 'bottom', children, __css, ...otherProps } = props;
26
+ const {
27
+ placement = 'bottom',
28
+ children,
29
+ label,
30
+ __css,
31
+ ...otherProps
32
+ } = props;
26
33
  const cssStyle = {
27
34
  variant: ['text.body-medium', 'text.body-small'],
28
35
  bg: alpha('#616161', 0.9),
@@ -35,7 +42,11 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
35
42
  };
36
43
 
37
44
  if (!children) {
38
- return <Box ref={forwardedRef} __css={cssStyle} {...otherProps} />;
45
+ return (
46
+ <Box ref={forwardedRef} __css={cssStyle} {...otherProps}>
47
+ {label}
48
+ </Box>
49
+ );
39
50
  }
40
51
 
41
52
  return (
@@ -45,6 +56,7 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
45
56
  ref={forwardedRef}
46
57
  placement={placement}
47
58
  distance={8}
59
+ label={label}
48
60
  __css={cssStyle}
49
61
  {...otherProps}
50
62
  >