karismatic-megafauna / school-working-days-calculator

Calculate the number of school working days from today
MIT License
5 stars 21 forks source link

Add A User Feedback Event [Success/Warning/Error] Banner #42

Closed karismatic-megafauna closed 6 years ago

karismatic-megafauna commented 6 years ago

If there is an event the user needs feedback on, an error, some info, a warning, there should be some sort of mechanic for displaying that message and some more detailed information to the user

One place that would be useful is when adding a date, having a little success banner saying "exclusion date successfully added" would be awesome!

Maybe base it off of this component from ant design? https://ant.design/components/alert/

Thanks ❤️

karismatic-megafauna commented 6 years ago

Perfect place for some user feedback in the form of an error:

addExclusionDate = () => {
  if (this.state.newExclusionReason === '') {
    return;
  }

  if (!this.state.newExclusionReason) {
    return;
  }
...