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) • 606 B
JavaScript
import React, { PropTypes } from 'react';
import { CardActions } from 'material-ui/Card';
import { ListButton, EditButton, DeleteButton } from '../button';
const cardActionStyle = {
zIndex: 2,
display: 'inline-block',
float: 'right',
};
const ShowActions = ({ basePath, data, hasDelete, hasEdit, refresh }) => (
<CardActions style={cardActionStyle}>
{hasEdit && <EditButton basePath={basePath} record={data} />}
<ListButton basePath={basePath} />
{hasDelete && <DeleteButton basePath={basePath} record={data} />}
</CardActions>
);
export default ShowActions;