Closed fairking closed 7 years ago
For the time being I've solved a problem by following workaround:
@(Html.Bootstrap().InputButton("Log In", buttonType: ButtonType.Submit) .SetBackgroundState(BackgroundState.Primary) .RemoveCss("btn-default"))
Glad you've got a workaround (for this issue at least). I've seen this and your other issues - it's a holiday weekend here and I'm trying to stay off of the computer :smile: I'll take a look at everything early next week.
The problem here is that button state and background state actually mean two different things and FluentBootstrap doesn't treat them as mutually exclusive. What you probably want to do is:
@(Html.Bootstrap().InputButton("Log In", buttonType: ButtonType.Submit).SetState(ButtonState.Primary))
Feel free to please reopen the issue if I've misunderstood.
The SetBackgroundState does not override default
E.g. the following razor
@(Html.Bootstrap().InputButton("Log In", buttonType: ButtonType.Submit) .SetBackgroundState(BackgroundState.Primary))
gives
<input type="submit" value="Log In" class="btn btn-default bg-primary">
so it looks like default background is applied![bootstrap_button_background](https://cloud.githubusercontent.com/assets/13495631/20640287/7d9eba70-b3d1-11e6-9e40-2e8e1db158a0.png)