import React from 'react'
import Loading from './Loading'

const SaveButton = ({saving, onClick, text="Save Changes", loadingText='Saving...', className='button-large button-primary'}) => {
  return (
    <div className="dreamfox-save-button">
      {saving && <Loading message={loadingText} />}
      {!saving && <input className={className} type="button" value={text} onClick={onClick}></input>}
    </div>
  )
}

export default SaveButton
