import * as PropTypes from 'prop-types';
import { Link } from 'react-router';
import { SuggestionLink } from './SuggestionsProvider';
+import * as theme from '../../../app/theme';
import BubblePopup, { BubblePopupPosition } from '../../../components/common/BubblePopup';
+import DetachIcon from '../../../components/icons-components/DetachIcon';
import { translate } from '../../../helpers/l10n';
import { getBaseUrl } from '../../../helpers/urls';
{this.renderTitle(translate('embed_docs.suggestion'))}
{this.props.suggestions.map((suggestion, index) => (
<li key={index}>
- <a href={suggestion.link} target="_blank">
- {suggestion.text} <i className="icon-detach" />
- </a>
+ <Link className="display-flex-center" target="_blank" to={suggestion.link}>
+ {suggestion.text}
+ <DetachIcon className="spacer-left" fill={theme.gray80} size={12} />
+ </Link>
</li>
))}
<li className="divider" />
<ul className="menu">
{this.renderSuggestions()}
<li>
- <Link target="_blank" to="/documentation">
- {translate('embed_docs.documentation_index')} <i className="icon-detach" />
+ <Link className="display-flex-center" target="_blank" to="/documentation">
+ {translate('embed_docs.documentation_index')}
+ <DetachIcon className="spacer-left" fill={theme.gray80} size={12} />
</Link>
</li>
{this.context.onSonarCloud && this.renderSonarCloudLinks()}
<li
key="0"
>
- <a
- href="#"
+ <Link
+ className="display-flex-center"
+ onlyActiveOnIndex={false}
+ style={Object {}}
target="_blank"
+ to="#"
>
foo
-
- <i
- className="icon-detach"
+ <DetachIcon
+ className="spacer-left"
+ fill="#cdcdcd"
+ size={12}
/>
- </a>
+ </Link>
</li>
<li
key="1"
>
- <a
- href="#"
+ <Link
+ className="display-flex-center"
+ onlyActiveOnIndex={false}
+ style={Object {}}
target="_blank"
+ to="#"
>
bar
-
- <i
- className="icon-detach"
+ <DetachIcon
+ className="spacer-left"
+ fill="#cdcdcd"
+ size={12}
/>
- </a>
+ </Link>
</li>
<li
className="divider"
</React.Fragment>
<li>
<Link
+ className="display-flex-center"
onlyActiveOnIndex={false}
style={Object {}}
target="_blank"
to="/documentation"
>
embed_docs.documentation_index
-
- <i
- className="icon-detach"
+ <DetachIcon
+ className="spacer-left"
+ fill="#cdcdcd"
+ size={12}
/>
</Link>
</li>
import Favorite from '../../../../components/controls/Favorite';
import HomePageSelect from '../../../../components/controls/HomePageSelect';
import Tooltip from '../../../../components/controls/Tooltip';
+import DetachIcon from '../../../../components/icons-components/DetachIcon';
import {
isShortLivingBranch,
isLongLivingBranch,
<div className="navbar-context-meta-secondary">
{isPullRequest(branchLike) &&
branchLike.url !== undefined && (
- <a className="big-spacer-right" href={branchLike.url} rel="nofollow" target="_blank">
+ <a
+ className="display-inline-flex-center big-spacer-right"
+ href={branchLike.url}
+ rel="nofollow"
+ target="_blank">
{translate('branches.see_the_pr')}
- <i className="icon-detach little-spacer-left" />
+ <DetachIcon className="little-spacer-left" size={12} />
</a>
)}
<BranchStatus branchLike={branchLike} />
className="navbar-context-meta-secondary"
>
<a
- className="big-spacer-right"
+ className="display-inline-flex-center big-spacer-right"
href="https://example.com/pull/1234"
rel="nofollow"
target="_blank"
>
branches.see_the_pr
- <i
- className="icon-detach little-spacer-left"
+ <DetachIcon
+ className="little-spacer-left"
+ size={12}
/>
</a>
<BranchStatus
font-size: var(--bigFontSize);
}
-.icon-detach:before {
- content: '\f08e';
- font-size: var(--mediumFontSize);
-}
-
.icon-chevron-left:before {
content: '\f104';
font-size: var(--mediumFontSize);
import * as React from 'react';
import { isProvided, getLinkName } from '../../project-admin/links/utils';
import { ProjectLink } from '../../../app/types';
+import DetachIcon from '../../../components/icons-components/DetachIcon';
import BugTrackerIcon from '../../../components/ui/BugTrackerIcon';
interface Props {
return <BugTrackerIcon />;
}
- return isProvided(link) ? (
- <i className={`icon-color-link icon-${link.type}`} />
- ) : (
- <i className="icon-color-link icon-detach" />
- );
+ return isProvided(link) ? <i className={`icon-color-link icon-${link.type}`} /> : <DetachIcon />;
}
import { isProvided, getLinkName } from './utils';
import { ProjectLink } from '../../../app/types';
import ConfirmButton from '../../../components/controls/ConfirmButton';
+import DetachIcon from '../../../components/icons-components/DetachIcon';
import BugTrackerIcon from '../../../components/ui/BugTrackerIcon';
import { Button } from '../../../components/ui/buttons';
import { translate, translateWithParameters } from '../../../helpers/l10n';
return (
<div>
- {this.renderIcon('icon-detach')}
+ <DetachIcon className="little-spacer-right" />
<div className="display-inline-block text-top">
<span className="js-name">{link.name}</span>
</div>
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 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.
+ */
+import * as React from 'react';
+import { IconProps } from './types';
+
+export default function DetachIcon({ className, fill = 'currentColor', size = 16 }: IconProps) {
+ return (
+ <svg
+ className={className}
+ height={size}
+ version="1.1"
+ viewBox="0 0 16 16"
+ width={size}
+ xmlSpace="preserve"
+ xmlnsXlink="http://www.w3.org/1999/xlink">
+ <path
+ d="M12 9.25v2.5A2.25 2.25 0 0 1 9.75 14h-6.5A2.25 2.25 0 0 1 1 11.75v-6.5A2.25 2.25 0 0 1 3.25 3h5.5c.14 0 .25.11.25.25v.5c0 .14-.11.25-.25.25h-5.5C2.562 4 2 4.563 2 5.25v6.5c0 .688.563 1.25 1.25 1.25h6.5c.688 0 1.25-.563 1.25-1.25v-2.5c0-.14.11-.25.25-.25h.5c.14 0 .25.11.25.25zm3-6.75v4c0 .273-.227.5-.5.5a.497.497 0 0 1-.352-.148l-1.375-1.375L7.68 10.57a.27.27 0 0 1-.18.078.27.27 0 0 1-.18-.078l-.89-.89a.27.27 0 0 1-.078-.18.27.27 0 0 1 .078-.18l5.093-5.093-1.375-1.375A.497.497 0 0 1 10 2.5c0-.273.227-.5.5-.5h4c.273 0 .5.227.5.5z"
+ style={{ fill }}
+ />;
+ </svg>
+ );
+}