How to add a class to useraccounts:semantic-ui


#1

Hello,

I am using useraccounts:semantic-ui and I would like to add a class of primary to the login/logout button.

This is the code that I am using:

  <div class="item">{{> atNavButton }}</div>

That renders to the following:

  <div class="item">
        <div class="ui button" id="at-nav-button">Sign Out</div>
  </div>

What I want is the ability to add a class of primary so that it renders as class=“ui primary button”

Does anyone have any idea how I can do this?

Thanks and be well,

Moshe


#2

A quick hack could be

Template.atNavButton.onRendered( function () {
    $("#at-nav-button").addClass("primary");
});

Otherwise you could always fork it and roll your own version :slight_smile:


#3

Thanks for the response.

I actually ended up using aldeed:template-extension as recommended on Stack Overflow:

Be well,

Moshe


#4

That’s a clever solution also!