File tree 2 files changed +44
-1
lines changed
2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+
4
+ < title > myPage</ title >
5
+ < script crossorigin src ="https://unpkg.com/react@16/umd/react.development.js "> </ script >
6
+ < script crossorigin src ="https://unpkg.com/react-dom@16/umd/react-dom.development.js "> </ script >
7
+ < script crossorigin src ="https://unpkg.com/@babel/standalone/babel.min.js "> </ script >
8
+ < Link href ="../style/react-custom-search-list.css " rel ="stylesheet " type ="text/css "/>
9
+ < script crossorigin src ="https://unpkg.com/@popperjs/core@2/dist/umd/popper.js "> </ script >
10
+ < script src ="../dist/react-custom-search-list.umd.js "> </ script >
11
+
12
+ < body >
13
+
14
+ < div id ="root "> </ div >
15
+
16
+ < script type ="text/babel ">
17
+ const ReactCustomSearchList = window . ReactCustomSearchList ?. default || window . ReactCustomSearchList ;
18
+ const Welcome = function Welcome ( props ) {
19
+ const [ value , setValue ] = React . useState ( '' ) ;
20
+ return ( < ReactCustomSearchList fullWidth = { true }
21
+ value = { value }
22
+ corner = { false }
23
+ theme = "panel"
24
+ onChange = { ( e ) => setValue ( e . target . value ) }
25
+ onClear = { ( ) => setValue ( '' ) } >
26
+ < ul >
27
+ < li > < button onClick = { ( ) => alert ( 'button click' ) } > Option A</ button > </ li >
28
+ < li > Option B</ li >
29
+ < li > Option C</ li >
30
+ </ ul >
31
+ </ ReactCustomSearchList > ) ;
32
+ } ;
33
+
34
+ ReactDOM . render ( < Welcome /> , document . getElementById ( 'root' ) ) ;
35
+ </ script >
36
+
37
+ </ body >
38
+
39
+ </ html >
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ const Config = ({
19
19
globals : {
20
20
'react-dom' : 'ReactDOM' ,
21
21
react : 'React' ,
22
+ '@popperjs/core/lib/popper-lite' : 'Popper' ,
23
+ '@popperjs/core/lib/modifiers/flip' : 'Popper.flip' ,
24
+ '@popperjs/core/lib/modifiers/preventOverflow' : 'Popper.preventOverflow' ,
25
+ '@popperjs/core/lib/modifiers/computeStyles' : 'Popper.computeStyles' ,
22
26
} ,
23
27
sourcemap : true ,
24
28
banner :
@@ -40,7 +44,7 @@ const Config = ({
40
44
return _plugins ;
41
45
} ) ( ) ,
42
46
external : function ( id ) {
43
- return / p r o p - t y p e s $ | r e a c t $ | r e a c t - d o m $ | .t e s t .j s $ | .j s .s n a p $ | .c s s $ / g. test ( id ) ;
47
+ return / ^ @ p o p p e r j s | p r o p - t y p e s $ | r e a c t $ | r e a c t - d o m $ | .t e s t .j s $ | .j s .s n a p $ | .c s s $ / g. test ( id ) ;
44
48
} ,
45
49
} ;
46
50
} ,
You can’t perform that action at this time.
0 commit comments