Add option for Button.

This commit is contained in:
ArthurSonzogni
2021-07-07 22:23:07 +02:00
committed by Arthur Sonzogni
parent cd84b187b3
commit 359100ca73
5 changed files with 19 additions and 11 deletions

View File

@@ -21,7 +21,9 @@ class ButtonBase : public ComponentBase {
static ButtonBase* From(Component);
// Constructor.
ButtonBase(ConstStringRef label, std::function<void()> on_click, bool border);
ButtonBase(ConstStringRef label,
std::function<void()> on_click,
ConstRef<ButtonOption> option);
~ButtonBase() override = default;
// Component implementation.
@@ -31,8 +33,8 @@ class ButtonBase : public ComponentBase {
private:
ConstStringRef label_;
std::function<void()> on_click_;
bool border_;
Box box_;
ConstRef<ButtonOption> option_;
};
} // namespace ftxui