@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
11 lines • 654 B
JavaScript
import React from "react";
import { ArrowsCirclepathIcon, TrashIcon } from "@navikt/aksel-icons";
import { Button } from "../../../../button/index.js";
import { useRenameCSS } from "../../../../theme/Theme.js";
const ItemButton = ({ action, onClick, id, title }) => {
const { cn } = useRenameCSS();
const Icon = action === "delete" ? TrashIcon : ArrowsCirclepathIcon;
return (React.createElement(Button, { id: id, className: cn("navds-file-item__button"), type: "button", variant: "tertiary-neutral", onClick: onClick, icon: React.createElement(Icon, { title: title }) }));
};
export default ItemButton;
//# sourceMappingURL=ItemButton.js.map