You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

17 lines
467 B

import React from "react";
import PropTypes from "prop-types";
import Button from 'antd/lib/button';
const MyButton = ({ buttonRef, text, click }) => (
<div ref={ buttonRef }><Button type="primary" onClick={ click }>
{ text }
</Button></div>
);
MyButton.propTypes = {
buttonRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
text: PropTypes.string.isRequired,
click: PropTypes.func.isRequired
};
export default MyButton;