RedHatInsights/insights-rbac-ui

View on GitHub
src/smart-components/group/group-row-wrapper.js

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';
import { RowWrapper } from '@patternfly/react-table';
import PropTypes from 'prop-types';
import classnames from 'classnames';

const GroupRowWrapper = ({ className, row, ...props }) => {
  return (
    <RowWrapper
      className={classnames(className, {
        'rbac-c-group-default': row.isPlatformDefault || row.isAdminDefault,
      })}
      row={row}
      {...props}
    />
  );
};

GroupRowWrapper.propTypes = {
  row: PropTypes.shape({
    isAdminDefault: PropTypes.bool,
    isPlatformDefault: PropTypes.bool,
  }),
  className: PropTypes.string,
};

export default GroupRowWrapper;