dioxus_tw_components/components/molecules/scrollable/
style.rs

1use super::props::*;
2use crate::attributes::*;
3use dioxus::prelude::*;
4
5impl Class for ScrollableProps {
6    fn base(&self) -> &'static str {
7        "scrollbar p-2 border border-border rounded-global-radius min-w-32"
8    }
9
10    fn orientation(&self) -> Option<&'static str> {
11        Some(match *self.orientation.read() {
12            Orientation::Horizontal => {
13                "overflow-y-auto overflow-x-hidden -rotate-90 origin-[right_top] -rotate-90"
14            }
15            Orientation::Vertical => "overflow-y-auto overflow-x-hidden grid-flow-row",
16        })
17    }
18}