How to design a widget based on API call results

Hello,

I don't even know if this is the proper path to take but it sounds like it.

Based on an API call that returns: is_online:true OR is_online:false I need to show it in the front end as a red circle with text asside that says Offline if is_online:false and

as a green circle with text asside that says Online if is_online:true.

Is designing a custom component the way to go?

If it is, once designed, how could I connect the true/false response to make the circle be red or green?

Thanks in advance for your answers!

Marius

1 reply