import { connect } from 'react-redux';
import Button from '../../shared/buttons/button';
import { toggleTheme } from '../../../redux/actions/theme';
import PropTypes from 'prop-types';

function ThemeButton(props) {
  return <Button color='blue' content='دارک' onClick={props.toggleTheme} />;
}

ThemeButton.propTypes = {
  toggleTheme: PropTypes.func.isRequired
};

export default connect(null, { toggleTheme })(ThemeButton);
