|
|
|
@ -11,9 +11,9 @@ public static class PageToolbarExtensions |
|
|
|
{ |
|
|
|
public static PageToolbar AddComponent<TComponent>( |
|
|
|
this PageToolbar toolbar, |
|
|
|
Dictionary<string, object> arguments = null, |
|
|
|
Dictionary<string, object?>? arguments = null, |
|
|
|
int order = 0, |
|
|
|
string requiredPolicyName = null) |
|
|
|
string? requiredPolicyName = null) |
|
|
|
{ |
|
|
|
return toolbar.AddComponent( |
|
|
|
typeof(TComponent), |
|
|
|
@ -26,9 +26,9 @@ public static class PageToolbarExtensions |
|
|
|
public static PageToolbar AddComponent( |
|
|
|
this PageToolbar toolbar, |
|
|
|
Type componentType, |
|
|
|
Dictionary<string, object> arguments = null, |
|
|
|
Dictionary<string, object?>? arguments = null, |
|
|
|
int order = 0, |
|
|
|
string requiredPolicyName = null) |
|
|
|
string? requiredPolicyName = null) |
|
|
|
{ |
|
|
|
toolbar.Contributors.Add( |
|
|
|
new SimplePageToolbarContributor( |
|
|
|
@ -46,14 +46,14 @@ public static class PageToolbarExtensions |
|
|
|
this PageToolbar toolbar, |
|
|
|
string text, |
|
|
|
Func<Task> clicked, |
|
|
|
object icon = null, |
|
|
|
Color color = null, |
|
|
|
object? icon = null, |
|
|
|
Color? color = null, |
|
|
|
bool disabled = false, |
|
|
|
int order = 0, |
|
|
|
string requiredPolicyName = null) |
|
|
|
string? requiredPolicyName = null) |
|
|
|
{ |
|
|
|
toolbar.AddComponent<ToolbarButton>( |
|
|
|
new Dictionary<string, object> |
|
|
|
new Dictionary<string, object?> |
|
|
|
{ |
|
|
|
{ nameof(ToolbarButton.Color), color ?? Color.Primary}, |
|
|
|
{ nameof(ToolbarButton.Text), text}, |
|
|
|
|