mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-18 01:18:23 +02:00
 --------- Signed-off-by: andreas-unleash <andreas@getunleash.ai> Co-authored-by: andreas-unleash <andreas@getunleash.ai>
28 lines
867 B
TypeScript
28 lines
867 B
TypeScript
import { StyledLink } from '../FeatureOverviewSidePanel/FeatureOverviewSidePanelDetails/StyledRow';
|
|
import { TooltipLink } from 'component/common/TooltipLink/TooltipLink';
|
|
import type { FC } from 'react';
|
|
|
|
export const ChildrenTooltip: FC<{
|
|
childFeatures: string[];
|
|
project: string;
|
|
}> = ({ childFeatures, project }) => (
|
|
<TooltipLink
|
|
tooltip={
|
|
<>
|
|
{childFeatures.map((child) => (
|
|
<StyledLink
|
|
key={`${project}-${child}`}
|
|
to={`/projects/${project}/features/${child}`}
|
|
>
|
|
<div>{child}</div>
|
|
</StyledLink>
|
|
))}
|
|
</>
|
|
}
|
|
>
|
|
{childFeatures.length === 1
|
|
? '1 feature'
|
|
: `${childFeatures.length} features`}
|
|
</TooltipLink>
|
|
);
|