/* * Copyright (c) 2020 - present Cloudogu GmbH * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see https://www.gnu.org/licenses/. */ import * as React from "react"; import { DisplayedUser } from "@scm-manager/ui-types"; import { Help, Tag } from "../index"; type Props = { items: DisplayedUser[]; label: string; helpText?: string; onRemove: (p: DisplayedUser[]) => void; }; /** * @deprecated */ export default class TagGroup extends React.Component { render() { const { items, label, helpText } = this.props; let help = null; if (helpText) { help = ; } return (
{label && items ? (
) : ( "" )} {items.map((item, key) => { return (
this.removeEntry(item)} />
); })}
); } removeEntry = (item: DisplayedUser) => { const newItems = this.props.items.filter((name) => name !== item); this.props.onRemove(newItems); }; }