<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
31 lines
703 B
TypeScript
31 lines
703 B
TypeScript
import { TechnologyIcon } from '@nx/graph/ui-icons';
|
|
import { HTMLProps } from 'react';
|
|
|
|
export interface TargetTechnologiesProps extends HTMLProps<HTMLDivElement> {
|
|
technologies?: string[];
|
|
showTooltip?: boolean;
|
|
}
|
|
|
|
export function TargetTechnologies({
|
|
technologies,
|
|
showTooltip,
|
|
...props
|
|
}: TargetTechnologiesProps) {
|
|
if (!technologies || technologies.length === 0) {
|
|
return null;
|
|
}
|
|
return (
|
|
<div className="flex gap-2">
|
|
{technologies.map((technology, index) => (
|
|
<TechnologyIcon
|
|
key={index}
|
|
technology={technology}
|
|
showTooltip={showTooltip}
|
|
monochromatic={true}
|
|
{...props}
|
|
/>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|