@singularsystems/neo-react 0.10.34 → 0.10.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ILinkProps extends React.HTMLProps<HTMLAnchorElement> {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Renders an anchor tag with an href of '/' unless otherwise specified.
|
|
6
|
+
* The onClick event will call preventDefault() so that the anchor acts like a button instead of a link to a url.
|
|
7
|
+
*/
|
|
8
|
+
export default class Link extends React.Component<ILinkProps> {
|
|
9
|
+
constructor(props: ILinkProps);
|
|
10
|
+
private onClick;
|
|
11
|
+
render(): JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Renders an anchor tag with an href of '/' unless otherwise specified.
|
|
5
|
+
* The onClick event will call preventDefault() so that the anchor acts like a button instead of a link to a url.
|
|
6
|
+
*/
|
|
7
|
+
var Link = /** @class */ (function (_super) {
|
|
8
|
+
__extends(Link, _super);
|
|
9
|
+
function Link(props) {
|
|
10
|
+
var _this = _super.call(this, props) || this;
|
|
11
|
+
_this.onClick = _this.onClick.bind(_this);
|
|
12
|
+
return _this;
|
|
13
|
+
}
|
|
14
|
+
Link.prototype.onClick = function (e) {
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
if (this.props.onClick) {
|
|
17
|
+
this.props.onClick(e);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
Link.prototype.render = function () {
|
|
21
|
+
var _a;
|
|
22
|
+
var props = this.props;
|
|
23
|
+
var href = (_a = props.href, (_a !== null && _a !== void 0 ? _a : "/"));
|
|
24
|
+
return React.createElement("a", __assign({}, props, { href: href, onClick: this.onClick }), this.props.children);
|
|
25
|
+
};
|
|
26
|
+
return Link;
|
|
27
|
+
}(React.Component));
|
|
28
|
+
export default Link;
|
|
@@ -20,6 +20,7 @@ import FormGroupInline from './FormGroup/FormGroupInline';
|
|
|
20
20
|
import Form from './Form';
|
|
21
21
|
import { FormContextProvider as FormContext } from './FormContext';
|
|
22
22
|
import GridLayout from './GridLayout';
|
|
23
|
+
import Link from './Link';
|
|
23
24
|
import Loader from './Loader';
|
|
24
25
|
import Modal from './Modal/Modal';
|
|
25
26
|
import ModalContainer from './Modal/ModalContainer';
|
|
@@ -37,4 +38,4 @@ import ToastContainer from './Notifications/ToastContainer';
|
|
|
37
38
|
import Tooltip from './Tooltip';
|
|
38
39
|
import TooltipProvider from './TooltipProvider';
|
|
39
40
|
import ValidationSummary from './ValidationSummary';
|
|
40
|
-
export { Alert, AutoCompleteDropDown, Button, Card, Checkbox, Collapsable, ColorPicker, ContextMenuContainer, DatePicker, DropDown, FileBasicInput, FileContext, FileDropArea, FileInput, FileUploadButton, FileUploadProgress, Form, FormContext, FormGroup, FormGroupFloating, FormGroupInline, GridLayout, Input, Loader, Modal, ModalContainer, NumberInput, Pager, PagerControlsBasic, PageSizeControl, Passwordbox, ProgressBar, RadioList, Slider, TabContainer, Tab, Textbox, Toast, ToastContainer, Tooltip, TooltipProvider, ValidationSummary };
|
|
41
|
+
export { Alert, AutoCompleteDropDown, Button, Card, Checkbox, Collapsable, ColorPicker, ContextMenuContainer, DatePicker, DropDown, FileBasicInput, FileContext, FileDropArea, FileInput, FileUploadButton, FileUploadProgress, Form, FormContext, FormGroup, FormGroupFloating, FormGroupInline, GridLayout, Input, Link, Loader, Modal, ModalContainer, NumberInput, Pager, PagerControlsBasic, PageSizeControl, Passwordbox, ProgressBar, RadioList, Slider, TabContainer, Tab, Textbox, Toast, ToastContainer, Tooltip, TooltipProvider, ValidationSummary };
|
|
@@ -20,6 +20,7 @@ import FormGroupInline from './FormGroup/FormGroupInline';
|
|
|
20
20
|
import Form from './Form';
|
|
21
21
|
import { FormContextProvider as FormContext } from './FormContext';
|
|
22
22
|
import GridLayout from './GridLayout';
|
|
23
|
+
import Link from './Link';
|
|
23
24
|
import Loader from './Loader';
|
|
24
25
|
import Modal from './Modal/Modal';
|
|
25
26
|
import ModalContainer from './Modal/ModalContainer';
|
|
@@ -37,4 +38,4 @@ import ToastContainer from './Notifications/ToastContainer';
|
|
|
37
38
|
import Tooltip from './Tooltip';
|
|
38
39
|
import TooltipProvider from './TooltipProvider';
|
|
39
40
|
import ValidationSummary from './ValidationSummary';
|
|
40
|
-
export { Alert, AutoCompleteDropDown, Button, Card, Checkbox, Collapsable, ColorPicker, ContextMenuContainer, DatePicker, DropDown, FileBasicInput, FileContext, FileDropArea, FileInput, FileUploadButton, FileUploadProgress, Form, FormContext, FormGroup, FormGroupFloating, FormGroupInline, GridLayout, Input, Loader, Modal, ModalContainer, NumberInput, Pager, PagerControlsBasic, PageSizeControl, Passwordbox, ProgressBar, RadioList, Slider, TabContainer, Tab, Textbox, Toast, ToastContainer, Tooltip, TooltipProvider, ValidationSummary };
|
|
41
|
+
export { Alert, AutoCompleteDropDown, Button, Card, Checkbox, Collapsable, ColorPicker, ContextMenuContainer, DatePicker, DropDown, FileBasicInput, FileContext, FileDropArea, FileInput, FileUploadButton, FileUploadProgress, Form, FormContext, FormGroup, FormGroupFloating, FormGroupInline, GridLayout, Input, Link, Loader, Modal, ModalContainer, NumberInput, Pager, PagerControlsBasic, PageSizeControl, Passwordbox, ProgressBar, RadioList, Slider, TabContainer, Tab, Textbox, Toast, ToastContainer, Tooltip, TooltipProvider, ValidationSummary };
|