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 11import { defineConfig } from 'dumi' ;
22import path from 'path' ;
33
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';
77
8- const name = 'tooltip' ;
8+ // const name = 'tooltip';
99
1010export default defineConfig ( {
1111 alias : {
@@ -18,6 +18,6 @@ export default defineConfig({
1818 name : 'Tooltip' ,
1919 logo : 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4' ,
2020 } ,
21- base : isProdSite ? `/${ name } /` : '/' ,
22- publicPath : isProdSite ? `/${ name } /` : '/' ,
21+ // base: isProdSite ? `/${name}/` : '/',
22+ // publicPath: isProdSite ? `/${name}/` : '/',
2323} ) ;
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 4141 "test" : " rc-test"
4242 },
4343 "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 " ,
4646 "classnames" : " ^2.3.1"
4747 },
4848 "devDependencies" : {
Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ export interface TooltipProps
4545 zIndex ?: number ;
4646 styles ?: TooltipStyles ;
4747 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' ] ;
4853}
4954
5055export interface TooltipStyles {
You can’t perform that action at this time.
0 commit comments