Sha256: 634e159d5b9042f79da026838af6a874517568bbb6642fa3ac0105212d6cead6

Contents?: true

Size: 766 Bytes

Versions: 4

Compression:

Stored size: 766 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import DefaultEmptyState from 'foremanReact/components/common/EmptyState';

const EmptyWebhooksTable = ({ message: { type, text } }) => (
  <DefaultEmptyState
    icon={type === 'error' ? 'error-circle-o' : 'add-circle-o'}
    header={type === 'error' ? __('Error') : __('No Results')}
    description={text}
    documentation={null}
  />
);

EmptyWebhooksTable.propTypes = {
  message: PropTypes.shape({
    type: PropTypes.oneOf(['empty', 'error']),
    text: PropTypes.string,
  }),
};

EmptyWebhooksTable.defaultProps = {
  message: PropTypes.shape({
    type: 'empty',
    text: 'No Results',
  }),
};

export default EmptyWebhooksTable;

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_webhooks-1.0.0 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/EmptyWebhooksTable/index.js
foreman_webhooks-0.0.3 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/EmptyWebhooksTable/index.js
foreman_webhooks-0.0.2 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/EmptyWebhooksTable/index.js
foreman_webhooks-0.0.1 webpack/ForemanWebhooks/Routes/Webhooks/WebhooksIndexPage/Components/EmptyWebhooksTable/index.js