ana-nova / color-theme-creator-app

https://color-theme-creator-app-peach.vercel.app
0 stars 0 forks source link

#7: Fetch API to Check If Contrast Is Okay #2

Closed ana-nova closed 3 days ago

ana-nova commented 4 days ago

As a Developer

I want to check the contrast ratio via an API when colors are added or edited

in order to ensure accessibility compliance.

https://github.com/neuefische/web-react-recap-project/assets/93415777/acb2b6f6-6a34-4300-957b-b766de773c7f

Acceptance Criteria

Tasks

Hint

This is how you can send data to an API, it is called a post request.

 async function postFetch() {
      const response = await fetch(
        "https://www.some-api-url.com/api",
        {
          method: "POST",
          body: JSON.stringify({ cool: true }),
          headers: {
           "Content-Type": "application/json",
         },
        }
      );
}
ana-nova commented 3 days ago

https://github.com/ana-nova/color-theme-creator-app/pull/14