How to use the patternfly-react.Button.propTypes function in patternfly-react

To help you get started, we’ve selected a few patternfly-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github theforeman / foreman / webpack / assets / javascripts / react_app / components / BreadcrumbBar / components / BreadcrumbSwitcherToggler.js View on Github external
import React from 'react';
import { Button, Icon } from 'patternfly-react';

// eslint-disable-next-line react/prefer-stateless-function
class BreadcrumbSwitcherToggler extends React.Component {
  render() {
    return (
      <button>
        
      </button>
    );
  }
}

BreadcrumbSwitcherToggler.propTypes = { ...Button.propTypes };

export default BreadcrumbSwitcherToggler;
github Katello / katello / webpack / move_to_foreman / components / common / ConfirmDialog / ConfirmDialog.js View on Github external
<button>
      {confirmLabel}
    </button>,
  ];

  return (
    <dialog>
  );
};

ConfirmDialog.propTypes = {
  ...Button.propTypes,
  onConfirm: PropTypes.func.isRequired,
  confirmLabel: PropTypes.string,
  confirmStyle: PropTypes.string,
};

ConfirmDialog.defaultProps = {
  ...Button.defaultProps,
  confirmLabel: __('Save'),
  cancelLabel: __('Cancel'),
  dangerouslySetInnerHTML: undefined,
  message: undefined,
  confirmStyle: 'primary',
};

export default ConfirmDialog;
</dialog>