diff --git a/src/GenOne.Blazor.BottomSheet/demo/BlazorHybrid/Pages/Index.razor b/src/GenOne.Blazor.BottomSheet/demo/BlazorHybrid/Pages/Index.razor index 09aed91..0dec62a 100644 --- a/src/GenOne.Blazor.BottomSheet/demo/BlazorHybrid/Pages/Index.razor +++ b/src/GenOne.Blazor.BottomSheet/demo/BlazorHybrid/Pages/Index.razor @@ -9,7 +9,7 @@ Times closed: @_closedCount; - + @if (isTrue) { @@ -20,7 +20,8 @@ Times closed: @_closedCount; } - + +
Bottome sheet 2
@@ -30,7 +31,7 @@ Times closed: @_closedCount; private BottomSheetBlazorJs? _sheet; private BottomSheetBlazorJs? _sheet2; private bool isTrue = false; - + private string _offset = "0"; private int _closedCount; public async Task OpenSheet() @@ -38,7 +39,7 @@ Times closed: @_closedCount; if (_sheet is null) throw new ArgumentNullException(); - await _sheet.Open(); + await _sheet.Open([50]); } public async Task OpenSheet2() @@ -46,11 +47,17 @@ Times closed: @_closedCount; if (_sheet2 is null) throw new ArgumentNullException(); - await _sheet2.Open(); + await _sheet2.Open([50]); } private void Test() { isTrue = !isTrue; } + + private void Callback() + { + _offset = _offset == "0" ? "50px" : "0"; + _sheet2?.AddBottomOffset(_offset); + } } diff --git a/src/GenOne.Blazor.BottomSheet/src/Components/BottomSheetBlazorJs.razor b/src/GenOne.Blazor.BottomSheet/src/Components/BottomSheetBlazorJs.razor index 9d3608c..40c3c11 100644 --- a/src/GenOne.Blazor.BottomSheet/src/Components/BottomSheetBlazorJs.razor +++ b/src/GenOne.Blazor.BottomSheet/src/Components/BottomSheetBlazorJs.razor @@ -2,11 +2,12 @@ @using GenOne.Blazor.BottomSheet.JsInterop; @inject BottomSheetJsInterop Interop +@implements IAsyncDisposable