/** * * HeaderActions * */ import React from 'react'; import PropTypes from 'prop-types'; import { HeaderActions as Wrapper } from '@buffetjs/styles'; import Button from '../Button'; function HeaderActions({ actions }) { return ( {actions.map((action, index) => { const { Component, disabled, label, onClick } = action; if (Component) { return ; } return ( ); })} ); } HeaderActions.defaultProps = { actions: [], }; HeaderActions.propTypes = { actions: PropTypes.arrayOf( PropTypes.shape({ disabled: PropTypes.bool, onClick: PropTypes.func, title: PropTypes.string, }) ), }; export default HeaderActions;