summaryrefslogtreecommitdiff
path: root/Pages/Component/Switch.razor
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-08-22 10:00:21 +1000
committerJake Mannens <jake@asger.xyz>2023-08-22 10:00:21 +1000
commitbe4496b110e68e2c5a8f76f8ed770e9818befd68 (patch)
tree25f597f34eaf357bd90a5b6b9b5440b7bf699ce1 /Pages/Component/Switch.razor
parentc29bdd4a9ec782411f57e3c798e1bb01ca7d417d (diff)
Finalised initial implementation of NSFW tag filtering
Diffstat (limited to 'Pages/Component/Switch.razor')
-rw-r--r--Pages/Component/Switch.razor5
1 files changed, 5 insertions, 0 deletions
diff --git a/Pages/Component/Switch.razor b/Pages/Component/Switch.razor
index ffb3543..d11ac81 100644
--- a/Pages/Component/Switch.razor
+++ b/Pages/Component/Switch.razor
@@ -3,6 +3,7 @@
<label>
<input
type="checkbox"
+ checked=@InitialValue
@onchange=@(e => OnToggle.InvokeAsync((e.Value as bool?) ?? false))
hidden/>
<div class="switch-outer">
@@ -11,5 +12,9 @@
</label>
@code {
+ [Parameter]
+ public bool InitialValue { get; set; } = false;
+
+ [Parameter]
public EventCallback<bool> OnToggle { get; set; }
}