1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-18 01:18:23 +02:00
unleash.unleash/frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewMetaData/ChildrenTooltip.tsx
Jaanus Sellin 233b882c7b
feat: merge feature toggle details with feature meta info box (#6977)
![image](https://github.com/Unleash/unleash/assets/964450/5286eb36-311d-42f9-90da-832724cc41d0)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: andreas-unleash <andreas@getunleash.ai>
2024-05-06 12:17:54 +03:00

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>
);