/// <summary> /// Adds a IResizeObserver as a Transient instance. /// </summary> /// <param name="services">IServiceCollection</param> /// <param name="options">Defines ResizeObserverOptions for this instance</param> /// <returns>Continues the IServiceCollection chain.</returns> public static IServiceCollection AddMudBlazorResizeObserver(this IServiceCollection services, ResizeObserverOptions options = null) { options ??= new ResizeObserverOptions(); services.AddMudBlazorResizeObserver(o => { o = options; }); return(services); }
public IResizeObserver Create(ResizeObserverOptions options) => new ResizeObserver(_provider.GetRequiredService <IJSRuntime>(), options);