mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
Switch from ReactJSS to styled-components in ui-components
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
// @flow
|
||||
//@flow
|
||||
import React from "react";
|
||||
import type { History } from "history";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import classNames from "classnames";
|
||||
import injectSheet from "react-jss";
|
||||
import { FilterInput } from "./forms";
|
||||
import { Button, urls } from "./index";
|
||||
import { FilterInput } from "./forms";
|
||||
|
||||
type Props = {
|
||||
showCreateButton: boolean,
|
||||
@@ -13,19 +12,10 @@ type Props = {
|
||||
label?: string,
|
||||
|
||||
// context props
|
||||
classes: Object,
|
||||
history: History,
|
||||
location: any
|
||||
};
|
||||
|
||||
const styles = {
|
||||
button: {
|
||||
float: "right",
|
||||
marginTop: "1.25rem",
|
||||
marginLeft: "1.25rem"
|
||||
}
|
||||
};
|
||||
|
||||
class OverviewPageActions extends React.Component<Props> {
|
||||
render() {
|
||||
const { history, location, link } = this.props;
|
||||
@@ -43,10 +33,10 @@ class OverviewPageActions extends React.Component<Props> {
|
||||
}
|
||||
|
||||
renderCreateButton() {
|
||||
const { showCreateButton, classes, link, label } = this.props;
|
||||
const { showCreateButton, link, label } = this.props;
|
||||
if (showCreateButton) {
|
||||
return (
|
||||
<div className={classNames(classes.button, "input-button control")}>
|
||||
<div className={classNames("input-button", "control")}>
|
||||
<Button label={label} link={`/${link}/create`} color="primary" />
|
||||
</div>
|
||||
);
|
||||
@@ -55,4 +45,4 @@ class OverviewPageActions extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
export default injectSheet(styles)(withRouter(OverviewPageActions));
|
||||
export default withRouter(OverviewPageActions);
|
||||
|
||||
Reference in New Issue
Block a user