mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
35 lines
706 B
JavaScript
35 lines
706 B
JavaScript
//@flow
|
|
import React from "react";
|
|
import { Link } from "react-router-dom";
|
|
import injectSheet from "react-jss";
|
|
import classNames from "classnames";
|
|
|
|
const styles = {
|
|
link: {
|
|
pointerEvents: "all"
|
|
}
|
|
};
|
|
|
|
type Props = {
|
|
to: string,
|
|
iconClass: string,
|
|
|
|
// context props
|
|
classes: any
|
|
};
|
|
|
|
class RepositoryEntryLink extends React.Component<Props> {
|
|
render() {
|
|
const { to, iconClass, classes } = this.props;
|
|
return (
|
|
<Link className={classNames("level-item", classes.link)} to={to}>
|
|
<span className="icon is-small">
|
|
<i className={classNames("fa", iconClass)} />
|
|
</span>
|
|
</Link>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default injectSheet(styles)(RepositoryEntryLink);
|