* 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.
40 lines
774 B
React
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;
|