mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
Uniform rendering of tooltips for repository badges (#1698)
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
This commit is contained in:
@@ -23,20 +23,23 @@
|
||||
*/
|
||||
|
||||
import React, { FC } from "react";
|
||||
import Tag from "../Tag";
|
||||
import { Color, Size } from "../styleConstants";
|
||||
import Tooltip from "../Tooltip";
|
||||
import Tag from "../Tag";
|
||||
|
||||
type Props = {
|
||||
color?: Color;
|
||||
title?: string;
|
||||
title: string;
|
||||
onClick?: () => void;
|
||||
size?: Size;
|
||||
};
|
||||
|
||||
const RepositoryFlag: FC<Props> = ({ children, size = "small", ...props }) => (
|
||||
<Tag size={size} {...props}>
|
||||
{children}
|
||||
</Tag>
|
||||
const RepositoryFlag: FC<Props> = ({ children, title, size = "small", ...props }) => (
|
||||
<Tooltip location="bottom" message={title}>
|
||||
<Tag size={size} {...props}>
|
||||
{children}
|
||||
</Tag>
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
export default RepositoryFlag;
|
||||
|
||||
Reference in New Issue
Block a user