MudBlazor / MudBlazor

Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a bare minimum it empowers .NET developers to easily debug it if needed.
http://mudblazor.com
MIT License
7.25k stars 1.18k forks source link

Snackbar: Make Snackbar.Configuration.PositionClass available for individual snackbars. #2863

Open Yomodo opened 2 years ago

Yomodo commented 2 years ago

Feature request type

Enhance component

Component name

Snackbar

Is your feature request related to a problem?

The Snackbar.Configuration.PositionClass is not available for individual Snackbars.

if (firstRender)
{
    Snackbar.Configuration.PositionClass = Defaults.Classes.Position.BottomCenter;

    _snackbar = Snackbar.Add("...", configure: config =>
   {
     config.Icon = Icons.Material.Filled.HourglassTop;
     config.ShowCloseIcon = true;
     config.RequireInteraction = true;
   });
}

Describe the solution you'd like

I would like to specify it as part of the configure options:

 _snackbar = Snackbar.Add("...", configure: config =>
   {
     ...
     config.PositionClass = Defaults.Classes.Position.BottomCenter;
   });

Have you seen this feature anywhere else?

No response

Describe alternatives you've considered

No response

Pull Request

Code of Conduct

SenerDemiral commented 1 year ago

Any news?