diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2017-05-01 15:06:25 +0200 |
---|---|---|
committer | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-05-02 14:45:47 +0200 |
commit | 19f9ad34bdca23ae4cfcc0bd601581f7c9c5442e (patch) | |
tree | fb67bd5531c4c1f921149e937195a7bcd8d62e06 /server/sonar-web/src/main/js/components/common/PrivateBadge.js | |
parent | cfa382b33eb58413abcf84635d5e45d1f21c4f21 (diff) | |
download | sonarqube-19f9ad34bdca23ae4cfcc0bd601581f7c9c5442e.tar.gz sonarqube-19f9ad34bdca23ae4cfcc0bd601581f7c9c5442e.zip |
SONAR-9164 Display project visibility badge
Diffstat (limited to 'server/sonar-web/src/main/js/components/common/PrivateBadge.js')
-rw-r--r-- | server/sonar-web/src/main/js/components/common/PrivateBadge.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/components/common/PrivateBadge.js b/server/sonar-web/src/main/js/components/common/PrivateBadge.js new file mode 100644 index 00000000000..775c0727911 --- /dev/null +++ b/server/sonar-web/src/main/js/components/common/PrivateBadge.js @@ -0,0 +1,39 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; +import classNames from 'classnames'; +import Tooltip from '../controls/Tooltip'; +import { translate } from '../../helpers/l10n'; +import './PrivateBadge.css'; + +type Props = { + className?: string +}; + +export default function PrivateBadge(props: Props) { + return ( + <Tooltip overlay={translate('visibility.private.description')}> + <div className={classNames('private-badge', props.className)}> + {translate('visibility.private')} + </div> + </Tooltip> + ); +} |