diff --git a/gradle/changelog/mirror_tag_import.yaml b/gradle/changelog/mirror_tag_import.yaml new file mode 100644 index 0000000000..5d1f21edac --- /dev/null +++ b/gradle/changelog/mirror_tag_import.yaml @@ -0,0 +1,2 @@ +- type: added + description: Option for different card variants for RepositoryFlag diff --git a/scm-ui/ui-components/src/repos/RepositoryFlag.tsx b/scm-ui/ui-components/src/repos/RepositoryFlag.tsx index 6735b73010..2f938921e1 100644 --- a/scm-ui/ui-components/src/repos/RepositoryFlag.tsx +++ b/scm-ui/ui-components/src/repos/RepositoryFlag.tsx @@ -25,6 +25,7 @@ import React, { FC } from "react"; import { Color, Size } from "../styleConstants"; import { Card } from "@scm-manager/ui-layout"; +import { CardVariant } from "@scm-manager/ui-core"; import { Tooltip } from "@scm-manager/ui-overlays"; import { TooltipLocation } from "../Tooltip"; @@ -34,33 +35,19 @@ type Props = { onClick?: () => void; size?: Size; tooltipLocation: TooltipLocation; + variant?: CardVariant; }; -/** - * @deprecated - * - * Please use your own component looking like this: - * - *
- * const RepositoryFlag: FC = ({ children, title, variant, ...props }) => (
-  
-    
-      {children}
-    
-  
-  );
- * 
- *
- * - * For reference, look at the RepositoryFlag component in the Repository Mirror Plugin. - */ -const RepositoryFlag: FC = ({ children, title, size = "small", tooltipLocation = "bottom", ...props }) => ( +const RepositoryFlag: FC = ({ + children, + title, + size = "small", + tooltipLocation = "bottom", + variant, + ...props +}) => ( - + {children}