remove color props

This commit is contained in:
Maren Süwer
2019-01-30 15:58:55 +01:00
parent 554b24a199
commit e878fac686
2 changed files with 3 additions and 7 deletions

View File

@@ -5,8 +5,6 @@ import Button from "./Button";
type Props = { type Props = {
firstlabel: string, firstlabel: string,
secondlabel: string, secondlabel: string,
firstColor: string,
secondColor: string,
firstAction?: (event: Event) => void, firstAction?: (event: Event) => void,
secondAction?: (event: Event) => void, secondAction?: (event: Event) => void,
firstIsSelected: boolean firstIsSelected: boolean
@@ -15,10 +13,10 @@ type Props = {
class ButtonGroup extends React.Component<Props> { class ButtonGroup extends React.Component<Props> {
render() { render() {
const { firstlabel, secondlabel, firstColor, secondColor, firstAction, secondAction, firstIsSelected } = this.props; const { firstlabel, secondlabel, firstAction, secondAction, firstIsSelected } = this.props;
let showFirstColor = firstColor; let showFirstColor = "";
let showSecondColor = secondColor; let showSecondColor = "";
if (firstIsSelected) { if (firstIsSelected) {
showFirstColor += "link is-selected"; showFirstColor += "link is-selected";

View File

@@ -47,8 +47,6 @@ class FileButtonGroup extends React.Component<Props> {
<ButtonGroup <ButtonGroup
firstlabel={sourcesLabel} firstlabel={sourcesLabel}
secondlabel={historyLabel} secondlabel={historyLabel}
firstColor=""
secondColor=""
firstAction={this.showSources} firstAction={this.showSources}
secondAction={this.showHistory} secondAction={this.showHistory}
firstIsSelected={!historyIsSelected} firstIsSelected={!historyIsSelected}