File tree Expand file tree Collapse file tree 5 files changed +54
-8
lines changed Expand file tree Collapse file tree 5 files changed +54
-8
lines changed Original file line number Diff line number Diff line change 1
1
import { defineConfig } from 'dumi' ;
2
2
import path from 'path' ;
3
3
4
- const isProdSite =
5
- // 不是预览模式 同时是生产环境
6
- process . env . PREVIEW !== 'true' && process . env . NODE_ENV === 'production' ;
4
+ // const isProdSite =
5
+ // // 不是预览模式 同时是生产环境
6
+ // process.env.PREVIEW !== 'true' && process.env.NODE_ENV === 'production';
7
7
8
- const name = 'tooltip' ;
8
+ // const name = 'tooltip';
9
9
10
10
export default defineConfig ( {
11
11
alias : {
@@ -18,6 +18,6 @@ export default defineConfig({
18
18
name : 'Tooltip' ,
19
19
logo : 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4' ,
20
20
} ,
21
- base : isProdSite ? `/${ name } /` : '/' ,
22
- publicPath : isProdSite ? `/${ name } /` : '/' ,
21
+ // base: isProdSite ? `/${name}/` : '/',
22
+ // publicPath: isProdSite ? `/${name}/` : '/',
23
23
} ) ;
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Two Buttons
3
+ order : 8
4
+ ---
5
+
6
+ Demonstrates two buttons with different tooltips on hover.
7
+
8
+ ``` jsx
9
+ import TwoButtonsDemo from ' ../examples/twoButtons' ;
10
+
11
+ export default () => < TwoButtonsDemo / > ;
12
+ ```
Original file line number Diff line number Diff line change
1
+ import { UniqueProvider } from '@rc-component/trigger' ;
2
+ import React from 'react' ;
3
+ import '../../assets/bootstrap.less' ;
4
+ import Tooltip from '../../src' ;
5
+
6
+ const TwoButtonsDemo = ( ) => (
7
+ < UniqueProvider >
8
+ < div style = { { margin : 100 } } >
9
+ < Tooltip
10
+ placement = "top"
11
+ trigger = { [ 'hover' ] }
12
+ overlay = "This is the first tooltip"
13
+ motion = { { motionName : 'rc-tooltip-zoom' } }
14
+ >
15
+ < button type = "button" > Button 1</ button >
16
+ </ Tooltip >
17
+ < Tooltip
18
+ placement = "top"
19
+ trigger = { [ 'hover' ] }
20
+ overlay = "This is the second tooltip"
21
+ motion = { { motionName : 'rc-tooltip-zoom' } }
22
+ >
23
+ < button type = "button" > Button 2</ button >
24
+ </ Tooltip >
25
+ </ div >
26
+ </ UniqueProvider >
27
+ ) ;
28
+
29
+ export default TwoButtonsDemo ;
Original file line number Diff line number Diff line change 41
41
"test" : " rc-test"
42
42
},
43
43
"dependencies" : {
44
- "@rc-component/trigger" : " ^3.0 .0" ,
45
- "@rc-component/util" : " ^1.0.1 " ,
44
+ "@rc-component/trigger" : " ^3.6 .0" ,
45
+ "@rc-component/util" : " ^1.3.0 " ,
46
46
"classnames" : " ^2.3.1"
47
47
},
48
48
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ export interface TooltipProps
45
45
zIndex ?: number ;
46
46
styles ?: TooltipStyles ;
47
47
classNames ?: TooltipClassNames ;
48
+ /**
49
+ * Configures Tooltip to reuse the background for transition usage.
50
+ * This is an experimental API and may not be stable.
51
+ */
52
+ unique ?: TriggerProps [ 'unique' ] ;
48
53
}
49
54
50
55
export interface TooltipStyles {
You can’t perform that action at this time.
0 commit comments