Skip to content

Commit

Permalink
color button on settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Nov 3, 2023
1 parent 26b0fa5 commit 4503fdc
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
var attributes = Model.node.Attributes.GetKratosUiNodeInputAttributes();
var uiText = attributes.Label ?? Model.node.Meta.Label;
var isFullWidth = Model.FlowType != FlowType.Settings;
var buttonType = attributes.Name switch
{
"lookup_secret_disable" => "is-warning",
"totp_unlink" => "is-warning",
_ => "is-success"
};

}

<div class="field">
<div class="control mt-5">
<button type="submit"
class="button is-success @(isFullWidth ? "is-fullwidth" : "")"
class="button @buttonType @(isFullWidth ? "is-fullwidth" : "")"
required="@attributes.Required"
disabled="@attributes.Disabled"
value="@attributes.Value"
Expand Down

0 comments on commit 4503fdc

Please sign in to comment.