Files
scratch-gui/src/components/button/button.jsx
T
Matthew Taylor 8dc26d8d30 Partially Implement GH-830: Add coming soon tooltips (#1069)
* Implement GH-830: Add coming soon tooltips

This implements coming soon tooltips for:
* the small stage size
* save, load and language

It also creates the component that can be copied over into the paint editor for use there as well.

Lastly, this does a small refactor on the full screen implementation to include multiple small screen sizes too.
2017-12-20 14:49:27 -05:00

40 lines
774 B
React

import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import styles from './button.css';
const ButtonComponent = ({
className,
onClick,
children,
...props
}) => {
if (props.disabled === true) {
onClick = function () {};
}
return (
<span
className={classNames(
styles.button,
className
)}
role="button"
onClick={onClick}
{...props}
>
{children}
</span>
);
};
ButtonComponent.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
disabled: PropTypes.bool,
onClick: PropTypes.func.isRequired
};
export default ButtonComponent;