+
+ {children()}
+
diff --git a/src/slider/slider.css b/src/slider/slider.css
index c137e80..84d2708 100644
--- a/src/slider/slider.css
+++ b/src/slider/slider.css
@@ -2,17 +2,20 @@
position: relative;
padding: 6px 0;
cursor: pointer;
+ user-select: none;
}
.thaw-slider-rail {
height: 4px;
background-color: var(--thaw-background-color);
border-radius: 2px;
+ cursor: pointer;
}
.thaw-slider-rail__fill {
width: 0%;
height: 4px;
background-color: var(--thaw-background-color-fill);
border-radius: 2px;
+ cursor: pointer;
}
.thaw-slider-handle {
position: absolute;
@@ -22,4 +25,5 @@
border-radius: 50%;
background-color: white;
box-shadow: 0px 0px 4px #2224;
+ transform: translateX(-50%);
}
diff --git a/src/slider/slider_label.css b/src/slider/slider_label.css
new file mode 100644
index 0000000..b562b20
--- /dev/null
+++ b/src/slider/slider_label.css
@@ -0,0 +1,6 @@
+.thaw-slider-label {
+ position: absolute;
+ display: inline-block;
+ transform: translateX(-50%);
+ margin-top: 8px;
+}
diff --git a/src/slider/slider_label.rs b/src/slider/slider_label.rs
new file mode 100644
index 0000000..89b8f1f
--- /dev/null
+++ b/src/slider/slider_label.rs
@@ -0,0 +1,23 @@
+use leptos::*;
+
+use crate::utils::mount_style;
+
+#[component]
+pub fn SliderLabel(
+ #[prop(into)] value: MaybeSignal
,
+ children: Children,
+) -> impl IntoView {
+
+ mount_style("slider-label", include_str!("./slider_label.css"));
+
+ view! {
+
+ {children()}
+
+ }
+}
+