UNPKG

admin-on-rest-fr05t1k

Version:

A frontend Framework for building admin applications on top of REST services, using ES6, React and Material UI

20 lines (16 loc) 598 B
import React, { PropTypes } from 'react'; import FlatButton from 'material-ui/FlatButton'; import NavigationRefresh from 'material-ui/svg-icons/navigation/refresh'; import translate from '../../i18n/translate'; const RefreshButton = ({ label = 'aor.action.refresh', translate, refresh }) => <FlatButton primary label={label && translate(label)} onClick={refresh} icon={<NavigationRefresh />} />; RefreshButton.propTypes = { label: PropTypes.string, refresh: PropTypes.func.isRequired, translate: PropTypes.func.isRequired, }; export default translate(RefreshButton);