Debian Codegraph @

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

raw
1 import { __rest } from "tslib";
2 import { jsx as _jsx } from "react/jsx-runtime";
3 import { Button } from '@patternfly/react-core/dist/esm/components/Button';
4 export const FavoritesCell = (_a) => {
5 var { className = '', onFavorite, isFavorited, rowIndex } = _a, props = __rest(_a, ["className", "onFavorite", "isFavorited", "rowIndex"]);
6 const ariaProps = rowIndex === undefined
7 ? {}
8 : {
9 id: `favorites-button-${rowIndex}`,
10 'aria-labelledby': `favorites-button-${rowIndex}`
11 };
12 return (_jsx(Button, Object.assign({ variant: "plain", className: className, type: "button", "aria-label": isFavorited ? 'Starred' : 'Not starred', onClick: onFavorite, isFavorite: true, isFavorited: isFavorited }, ariaProps, props)));
13 };
14 FavoritesCell.displayName = 'FavoritesCell';
15 //# sourceMappingURL=FavoritesCell.js.map