-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSwitch.hx
More file actions
31 lines (25 loc) · 767 Bytes
/
Copy pathSwitch.hx
File metadata and controls
31 lines (25 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package react.router;
import history.Location;
import react.ReactComponent;
typedef SwitchProps = {
/**
A location object to be used for matching children elements instead of
the current history location (usually the current browser URL).
*/
@:optional var location:Location;
/**
All children of a <Switch> should be <Route> or <Redirect> elements.
Only the first child to match the current location will be rendered.
*/
#if react_next
var children:ReactFragment;
#else
var children:Dynamic;
#end
}
/**
Renders the first child <Route> or <Redirect> that matches the location.
See https://reacttraining.com/react-router/web/api/Switch
*/
@:jsRequire('react-router', 'Switch')
extern class Switch extends ReactComponentOfProps<SwitchProps> {}