File tree 10 files changed +47
-11
lines changed
10 files changed +47
-11
lines changed Original file line number Diff line number Diff line change 1
1
package react .router ;
2
2
3
- @:jsRequire (' react-router' , ' IndexLink' )
3
+ #if (jsImport)
4
+ @:js.import (' react-router-dom' , ' IndexLink' )
5
+ #else
6
+ @:jsRequire (' react-router-dom' , ' IndexLink' )
7
+ #end
4
8
extern class IndexLink extends react. ReactComponent {}
Original file line number Diff line number Diff line change 1
1
package react .router ;
2
2
3
- @:jsRequire (' react-router' , ' IndexRedirect' )
3
+ #if (jsImport)
4
+ @:js.import (' react-router-dom' , ' IndexRedirect' )
5
+ #else
6
+ @:jsRequire (' react-router-dom' , ' IndexRedirect' )
7
+ #end
4
8
extern class IndexRedirect extends react. ReactComponent {}
Original file line number Diff line number Diff line change 1
1
package react .router ;
2
2
3
- @:jsRequire (' react-router' , ' IndexRoute' )
3
+ #if (jsImport)
4
+ @:js.import (' react-router-dom' , ' IndexRoute' )
5
+ #else
6
+ @:jsRequire (' react-router-dom' , ' IndexRoute' )
7
+ #end
4
8
extern class IndexRoute extends react. ReactComponent {}
Original file line number Diff line number Diff line change 1
1
package react .router ;
2
2
3
- @:jsRequire (' react-router' ,' Link' )
3
+ #if (jsImport)
4
+ @:js.import (' react-router-dom' , ' Link' )
5
+ #else
6
+ @:jsRequire (' react-router-dom' , ' Link' )
7
+ #end
4
8
extern class Link extends react. ReactComponent {}
Original file line number Diff line number Diff line change 1
1
package react .router ;
2
2
3
- @:jsRequire (' react-router' , ' Redirect' )
3
+ #if (jsImport)
4
+ @:js.import (' react-router-dom' , ' Redirect' )
5
+ #else
6
+ @:jsRequire (' react-router-dom' , ' Redirect' )
7
+ #end
4
8
extern class Redirect extends react. ReactComponent {}
Original file line number Diff line number Diff line change 1
1
package react .router ;
2
2
3
- @:jsRequire (' react-router' , ' Route' )
3
+ #if (jsImport)
4
+ @:js.import (' react-router-dom' , ' Route' )
5
+ #else
6
+ @:jsRequire (' react-router-dom' , ' Route' )
7
+ #end
4
8
extern class Route extends react. ReactComponent {}
Original file line number Diff line number Diff line change 1
1
package react .router ;
2
2
3
- @:jsRequire (' react-router' , ' Router' )
3
+ #if (jsImport)
4
+ @:js.import (' react-router-dom' , ' Router' )
5
+ #else
6
+ @:jsRequire (' react-router-dom' , ' Router' )
7
+ #end
4
8
extern class Router extends react. ReactComponent {}
Original file line number Diff line number Diff line change 1
1
package react .router ;
2
2
3
- @:jsRequire (' react-router' , ' RouterContext' )
3
+ #if (jsImport)
4
+ @:js.import (' react-router-dom' , ' RouterContext' )
5
+ #else
6
+ @:jsRequire (' react-router-dom' , ' RouterContext' )
7
+ #end
4
8
extern class RouterContext extends react. ReactComponent {}
Original file line number Diff line number Diff line change @@ -2,7 +2,11 @@ package react.router;
2
2
3
3
import react .router .Types ;
4
4
5
- @:jsRequire (' react-router' )
5
+ #if (jsImport)
6
+ @:js.import (@default ' react-router-dom' )
7
+ #else
8
+ @:jsRequire (' react-router-dom' )
9
+ #end
6
10
extern class Statics {
7
11
static public var hashHistory : HashHistory ;
8
12
static public var browserHistory : BrowserHistory ;
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ typedef Any = Dynamic;
11
11
typedef HashHistory = Router <Any , Any >;
12
12
typedef BrowserHistory = Router <Any , Any >;
13
13
typedef RouteProps = RoutePropsOf <Any , Any >;
14
- typedef RoutePropsOfParams <P > = RoutePropsOf <P , Any >;
15
- typedef RoutePropsOfQuery <Q > = RoutePropsOf <Any , Q >;
14
+ typedef RoutePropsOfParams <P > = RoutePropsOf <P , Any >;
15
+ typedef RoutePropsOfQuery <Q > = RoutePropsOf <Any , Q >;
16
16
17
17
typedef RoutePropsOf <P , Q > = {
18
18
route : Route <P , Q >,
You can’t perform that action at this time.
0 commit comments