Debian Codegraph @

node/@patternfly/react-table/dist/js/components/Table/FavoritesCell.js

raw
1 "use strict";
2 Object.defineProperty(exports, "__esModule", { value: true });
3 exports.FavoritesCell = void 0;
4 const tslib_1 = require("tslib");
5 const jsx_runtime_1 = require("react/jsx-runtime");
6 const Button_1 = require('@patternfly/react-core/dist/js/components/Button');
7 const FavoritesCell = (_a) => {
8 var { className = '', onFavorite, isFavorited, rowIndex } = _a, props = tslib_1.__rest(_a, ["className", "onFavorite", "isFavorited", "rowIndex"]);
9 const ariaProps = rowIndex === undefined
10 ? {}
11 : {
12 id: `favorites-button-${rowIndex}`,
13 'aria-labelledby': `favorites-button-${rowIndex}`
14 };
15 return ((0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ variant: "plain", className: className, type: "button", "aria-label": isFavorited ? 'Starred' : 'Not starred', onClick: onFavorite, isFavorite: true, isFavorited: isFavorited }, ariaProps, props)));
16 };
17 exports.FavoritesCell = FavoritesCell;
18 exports.FavoritesCell.displayName = 'FavoritesCell';
19 //# sourceMappingURL=FavoritesCell.js.map