Skip to content

Commit

Permalink
Add OnClick Parameter to New-UDCounter
Browse files Browse the repository at this point in the history
  • Loading branch information
AlonGvili authored Aug 16, 2019
1 parent 9150c70 commit a280ffa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/UniversalDashboard/Cmdlets/NewCounterCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@ public class NewCounterCommand : CallbackCmdlet

[Parameter()]
public TextAlignment TextAlignment { get; set; }

[Parameter()]
public ScriptBlock OnClick { get; set; }

protected override void EndProcessing()
{
var counter = new Counter
{
AutoRefresh = AutoRefresh,
RefreshInterval = RefreshInterval,
Callback = GenerateCallback(Id),
OnClick = GenerateCallback(Id + "onClick", OnClick, null),
Format = Format,
Icon = FontAwesomeIconsExtensions.GetIconName(Icon),
Title = Title,
Expand Down

0 comments on commit a280ffa

Please sign in to comment.