Real-Dev-Squad / feature-flag-service

MIT License
3 stars 7 forks source link

new feature notifications in UI completed with styling and tests #53

Open ivinayakg opened 2 years ago

ivinayakg commented 2 years ago

Description

I created a system for notifications throughout the react application. You get two main things from the main file one is a react component which has to be rendered on the top of the stack with given a prop of timeout(time you want to show a notification for) which defaults to 2000ms. Second is a simple javascript function NotificationHandler which can be called from anywhere from the entire app with a data object which would be:-

data = {
  message : string,
  type : string (options are "success" | "warning" | "error")
}

The color of the notification would be based upon the "type" of the data object. right now the color would be shown as the background of the notification but as we decide what kind of icon library or solution we would be using then in the future only the icon with the associated color and message from the data will be rendered. The demo of the feature is as below.

Demo Video

Fixes #30

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

Checklist:

ivinayakg commented 2 years ago

i will re-write the tests, but apart from that I have migrated to Context API have a look @Neha @pallabez

Neha commented 1 year ago

@ivinayakg could you please resolve the conflict file? So, that we can merge this branch