summaryrefslogtreecommitdiff
path: root/Pages/Component/Dialog.razor
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-10-05 15:53:02 +1100
committerJake Mannens <jake@asger.xyz>2023-10-05 15:53:02 +1100
commit3d5f6e47bd74ce77d5ec253f51b7cef1b42099ef (patch)
tree26add459f06b46ed74bfb0b6788b258d2dd11b3d /Pages/Component/Dialog.razor
parentaa0b68f7648bd5a7c14b64737a4f8d3e402bfce5 (diff)
Continued to refine ACLDialog
Diffstat (limited to 'Pages/Component/Dialog.razor')
-rw-r--r--Pages/Component/Dialog.razor22
1 files changed, 20 insertions, 2 deletions
diff --git a/Pages/Component/Dialog.razor b/Pages/Component/Dialog.razor
index 8e8ddca..ac05515 100644
--- a/Pages/Component/Dialog.razor
+++ b/Pages/Component/Dialog.razor
@@ -30,6 +30,14 @@
public int HeightPixels { set => height = $"{value}px"; }
[Parameter]
public int HeightPercent { set => height = $"{value}%"; }
+ [Parameter]
+ public int MinHeightPixels { set => minHeight = $"{value}px"; }
+ [Parameter]
+ public int MinHeightPercent { set => minHeight = $"{value}%"; }
+ [Parameter]
+ public int MaxHeightPixels { set => maxHeight = $"{value}px"; }
+ [Parameter]
+ public int MaxHeightPercent { set => maxHeight = $"{value}%"; }
public bool Visible {
get => visible;
@@ -45,6 +53,8 @@
private string? width;
private string? height;
+ private string? minHeight;
+ private string? maxHeight;
private ElementReference dialogDiv;
@@ -68,11 +78,19 @@
}
}
- private string sizeStyle => widthStyle + heightStyle;
+ private string sizeStyle => string.Join("", new[] {
+ widthStyle, heightStyle, minHeightStyle, maxHeightStyle
+ });
private string widthStyle =>
$"{(width is null ? "" : $"width:{width};")}";
private string heightStyle =>
- $"{(height is null ? "" : $"max-height:{height};")}";
+ $"{(height is null ? "" : $"height:{height};")}";
+
+ private string minHeightStyle =>
+ $"{(minHeight is null ? "" : $"min-height:{minHeight};")}";
+
+ private string maxHeightStyle =>
+ $"{(maxHeight is null ? "" : $"max-height:{maxHeight};")}";
}