mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 12:05:52 +01:00
Fix jumping and broken tool tips (#2026)
The way the tool tip implements passed class names is mistakable. The passed classes broke the tool tip and are removed. The same issue led to a broken tool tip for the code search and is fixed as well. Unnecessary code is removed from help. Fixes #2025
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
*/
|
||||
import React, { FC } from "react";
|
||||
import classNames from "classnames";
|
||||
import styled from "styled-components";
|
||||
import Tooltip from "./Tooltip";
|
||||
import HelpIcon from "./HelpIcon";
|
||||
|
||||
@@ -34,19 +33,15 @@ type Props = {
|
||||
id?: string;
|
||||
};
|
||||
|
||||
const AbsolutePositionTooltip = styled(Tooltip)`
|
||||
position: absolute;
|
||||
`;
|
||||
|
||||
const Help: FC<Props> = ({ message, multiline, className, id }) => (
|
||||
<AbsolutePositionTooltip
|
||||
<Tooltip
|
||||
className={classNames("is-inline-block", "pl-1", className)}
|
||||
message={message}
|
||||
id={id}
|
||||
multiline={multiline}
|
||||
>
|
||||
<HelpIcon />
|
||||
</AbsolutePositionTooltip>
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
Help.defaultProps = {
|
||||
|
||||
@@ -37,17 +37,17 @@ export default class TagGroup extends React.Component<Props> {
|
||||
const { items, label, helpText } = this.props;
|
||||
let help = null;
|
||||
if (helpText) {
|
||||
help = <Help className="is-relative" message={helpText} />;
|
||||
help = <Help message={helpText} />;
|
||||
}
|
||||
return (
|
||||
<div className="field is-grouped is-grouped-multiline">
|
||||
{label && items ? (
|
||||
<div className="control">
|
||||
<strong>
|
||||
{label}
|
||||
<label className="label">
|
||||
<span>{label} </span>
|
||||
{help}
|
||||
{items.length > 0 ? ":" : ""}
|
||||
</strong>
|
||||
</label>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
|
||||
Reference in New Issue
Block a user