// @flow import React from "react"; import { translate } from "react-i18next"; import { Button } from "@scm-manager/ui-components"; type Props = { t: string => string, historyIsSelected: boolean, showHistory: boolean => void }; class ButtonGroup extends React.Component { showHistory = () => { this.props.showHistory(true); }; showSources = () => { this.props.showHistory(false); }; render() { const { t, historyIsSelected } = this.props; let sourcesColor = ""; let historyColor = ""; if (historyIsSelected) { historyColor = "info is-selected"; } else { sourcesColor = "info is-selected"; } const sourcesLabel = ( <> {t("sources.content.sourcesButton")} ); const historyLabel = ( <> {t("sources.content.historyButton")} ); return (
); } } export default translate("repos")(ButtonGroup);