forked from dnnsoftware/Dnn.Platform
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.jsx
More file actions
30 lines (25 loc) · 802 Bytes
/
Copy pathindex.jsx
File metadata and controls
30 lines (25 loc) · 802 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
import React from "react";
import PropTypes from "prop-types";
import { ArrowBack } from "../SvgIcons";
import "./style.less";
const BackToLink = ({text, children, className, onClick, style, arrowStyle}) => {
return (
<a className={"dnn-back-to-link" + (className ? (" " + className) : "")} style={style} onClick={onClick}>
<div style={arrowStyle} className="dnn-back-to-arrow"><ArrowBack /></div>
<span>{text}</span>
{children}
</a>
);
};
BackToLink.propTypes = {
children: PropTypes.node,
text: PropTypes.node.isRequired,
className: PropTypes.string,
onClick: PropTypes.func,
arrowStyle: PropTypes.object,
style: PropTypes.object
};
BackToLink.defaultProps = {
className: ""
};
export default BackToLink;