@giteeteam/apps-team-components 1.0.9 → 1.0.10

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,10 +1,6 @@
1
- import { CSSProperties } from 'react';
2
- interface BaseOverflowTooltip {
3
- className?: string;
4
- title?: string;
5
- children: any;
1
+ /// <reference types="react" />
2
+ interface BaseOverflowTooltip extends React.HTMLAttributes<HTMLSpanElement> {
6
3
  maxline?: number;
7
- style?: CSSProperties;
8
4
  }
9
5
  declare const BaseOverflowTooltip: React.FC<BaseOverflowTooltip>;
10
6
  declare const _default: import("react").NamedExoticComponent<BaseOverflowTooltip>;
@@ -3,7 +3,7 @@ import { cloneElement, memo, useRef } from 'react';
3
3
  import { ClassNames } from '@emotion/react';
4
4
  import { getTooltipMaxlineStyle, tooltipOverflowStyle } from './style';
5
5
  const BaseOverflowTooltip = props => {
6
- const { className, title, children, maxline, style } = props;
6
+ const { className, title, children, maxline = 1, style, onClick } = props;
7
7
  const elRef = useRef();
8
8
  if (!children) {
9
9
  return null;
@@ -15,12 +15,9 @@ const BaseOverflowTooltip = props => {
15
15
  className: cx(css(tooltipOverflowStyle), css(getTooltipMaxlineStyle(maxline)), className),
16
16
  style,
17
17
  title: title || '',
18
+ onClick,
18
19
  });
19
20
  } }));
20
21
  };
21
- BaseOverflowTooltip.defaultProps = {
22
- className: '',
23
- title: '',
24
- maxline: 1,
25
- };
22
+ BaseOverflowTooltip.displayName = 'BaseOverflowTooltip';
26
23
  export default memo(BaseOverflowTooltip);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.0.9",
4
- "description": "",
3
+ "version": "1.0.10",
4
+ "description": "Gitee team components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
7
7
  "scripts": {