Skip to content

Commit

Permalink
No need for components as members
Browse files Browse the repository at this point in the history
  • Loading branch information
lemniscate8 committed Aug 9, 2021
1 parent 8f649f3 commit 6ebd496
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/emp/prefab/ToggleButtonGroup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ namespace emp::prefab {
return dynamic_cast<internal::ToggleButtonGroupInfo *>(info);
}

web::Element activate_label;
web::Element deactivate_label;

protected:
/**
* @param activate_indicator a string, FontAwesomeIcon or other component
Expand All @@ -75,14 +72,17 @@ namespace emp::prefab {
const bool & cassette_style,
const bool & grayout,
web::internal::DivInfo * info_ref
) : ButtonGroup(info_ref),
activate_label("label", emp::to_string(GetID(), "_activate")),
deactivate_label("label", emp::to_string(GetID(), "_deactivate")) {
) : ButtonGroup(info_ref)
{
AddAttr(
"class", "btn-group-toggle", "data-toggle", "buttons"
);

web::Element activate_label("label", emp::to_string(GetID(), "_activate"));
web::Element deactivate_label("label", emp::to_string(GetID(), "_deactivate"));
*this << activate_label;
*this << deactivate_label;

if (!cassette_style) {
AddAttr("class", "hide_inactive");
} else if (grayout) {
Expand Down

0 comments on commit 6ebd496

Please sign in to comment.