-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLink.hx
39 lines (32 loc) · 873 Bytes
/
Link.hx
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
31
32
33
34
35
36
37
38
package react.router;
import haxe.extern.EitherType;
import history.Location;
import js.html.HtmlElement;
import react.ReactComponent;
typedef LinkProps = {
/**
The path or location to link to.
*/
var to:EitherType<String, Location>;
/**
When true, clicking the link will replace the current entry in the
history stack instead of adding a new one.
*/
@:optional var replace:Bool;
/**
Allows access to the underlying ref of the component.
*/
@:optional var innerRef:HtmlElement->Void;
#if react_next
@:optional var children:ReactFragment;
#else
@:optional var children:ReactElement;
#end
}
/**
Provides declarative, accessible navigation around your application.
See https://reacttraining.com/react-router/web/api/Link
*/
@:acceptsMoreProps
@:jsRequire('react-router-dom', 'Link')
extern class Link extends ReactComponentOfProps<LinkProps> {}