mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-29 05:04:31 +08:00
21 lines
424 B
JavaScript
21 lines
424 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
|
|
const Button = ({ disabled, label, style, onClick }) => (
|
|
<button disabled={disabled} onClick={onClick}>
|
|
{label}
|
|
</button>
|
|
);
|
|
|
|
Object.assign(Button, {
|
|
displayName: 'Button',
|
|
propTypes: {
|
|
label: PropTypes.string.isRequired,
|
|
style: PropTypes.object,
|
|
disabled: PropTypes.bool,
|
|
onClick: PropTypes.func,
|
|
},
|
|
});
|
|
|
|
export default Button;
|