Esp32-RBGridUI
Library for creating UIs for the RBController app
Loading...
Searching...
No Matches
led.h
Go to the documentation of this file.
1#pragma once
2
3#include "../widgets/led.h"
4#include "widget.h"
5
6namespace gridui {
7namespace builder {
8
11class Led : public Widget, public BuilderMixin<Led, gridui::Led> {
12 static const char* name() { return "Led"; }
13
14 friend class gridui::_GridUi;
15 using Widget::Widget;
16
17public:
18 Led& color(const std::string& color) {
19 extra().set("color", color);
20 return *this;
21 }
22
23 Led& on(bool on) {
24 extra().set("on", new rbjson::Bool(on));
25 return *this;
26 }
27};
28
29};
30};
Led & on(bool on)
Definition led.h:23
Led & color(const std::string &color)
Definition led.h:18
rbjson::Object & extra()
Definition widget.cpp:16
Definition arm.h:8