feat: add styleClass as an option to Dialogs.

This commit is contained in:
rabbitism
2024-11-03 01:19:42 +08:00
parent 571e1fec5f
commit ee707cd977
8 changed files with 49 additions and 3 deletions

View File

@@ -217,6 +217,11 @@ public static class Drawer
if(options.MinHeight is not null) drawer.MinHeight = options.MinHeight.Value;
if(options.MaxHeight is not null) drawer.MaxHeight = options.MaxHeight.Value;
}
if (!string.IsNullOrWhiteSpace(options.StyleClass))
{
drawer.Classes.Add(options.StyleClass!);
}
}
private static void ConfigureDefaultDrawer(DefaultDrawerControl drawer, DrawerOptions? options)
@@ -239,5 +244,9 @@ public static class Drawer
if(options.MinHeight is not null) drawer.MinHeight = options.MinHeight.Value;
if(options.MaxHeight is not null) drawer.MaxHeight = options.MaxHeight.Value;
}
if (!string.IsNullOrWhiteSpace(options.StyleClass))
{
drawer.Classes.Add(options.StyleClass!);
}
}
}

View File

@@ -22,4 +22,6 @@ public class DrawerOptions
public int? TopLevelHashCode { get; set; }
public bool CanResize { get; set; }
public string? StyleClass { get; set; }
}