File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 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 = ({
1919 globals : {
2020 'react-dom' : 'ReactDOM' ,
2121 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' ,
2226 } ,
2327 sourcemap : true ,
2428 banner :
@@ -40,7 +44,7 @@ const Config = ({
4044 return _plugins ;
4145 } ) ( ) ,
4246 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 ) ;
4448 } ,
4549 } ;
4650 } ,
You can’t perform that action at this time.
0 commit comments