@loadsmart/loadsmart-ui 5.18.0 → 5.19.0

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": "@loadsmart/loadsmart-ui",
3
- "version": "5.18.0",
3
+ "version": "5.19.0",
4
4
  "description": "Miranda UI, a React UI library",
5
5
  "main": "dist",
6
6
  "files": [
@@ -11,7 +11,7 @@ import ellipsizable from 'styles/ellipsizable'
11
11
  import font from 'styles/font'
12
12
  import { getToken as token } from 'theming'
13
13
 
14
- import { Tooltip } from '../Tooltip'
14
+ import { Tooltip, TooltipProps } from '../Tooltip'
15
15
 
16
16
  type AcceptedType = 'label' | 'div' | 'span'
17
17
 
@@ -21,6 +21,7 @@ interface WithAdditionalProps {
21
21
  required?: boolean
22
22
  scheme?: ColorScheme
23
23
  tip?: ReactNode
24
+ tipProps?: Omit<TooltipProps, 'message'>
24
25
  }
25
26
 
26
27
  export interface LabelProps
@@ -91,6 +92,7 @@ function Label({
91
92
  required,
92
93
  scheme = 'light',
93
94
  tip,
95
+ tipProps = {},
94
96
  ...others
95
97
  }: LabelProps): JSX.Element {
96
98
  const tag = String(as || 'label') as AcceptedType
@@ -107,7 +109,7 @@ function Label({
107
109
  <StyledChildren scheme={scheme}>{children}</StyledChildren>
108
110
  {required && <StyledRequired>*</StyledRequired>}
109
111
  {!isNil(tip) && (
110
- <Tooltip scheme={scheme} message={tip || ''}>
112
+ <Tooltip scheme={scheme} message={tip || ''} {...tipProps}>
111
113
  <StyledTooltipAnchor scheme={scheme}>?</StyledTooltipAnchor>
112
114
  </Tooltip>
113
115
  )}