dioxus_tw_components/components/organisms/form/slider/
style.rs1use super::props::*;
2use crate::attributes::*;
3use dioxus::prelude::*;
4
5impl Class for SliderProps {
6 fn base(&self) -> &'static str {
7 "w-full disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer"
8 }
9
10 fn color(&self) -> Option<&'static str> {
11 Some(match *self.color.read() {
12 Color::Default => "accent-foreground",
13 Color::Primary => "accent-primary",
14 Color::Secondary => "accent-secondary",
15 Color::Destructive => "accent-destructive",
16 Color::Success => "accent-success",
17 Color::Accent => "accent-accent",
18 Color::Muted => "accent-muted",
19 })
20 }
21}
22
23impl Class for SliderLabelProps {
24 fn base(&self) -> &'static str {
25 "text-xs"
26 }
27}
28
29impl Class for SliderTicksProps {}