ScrollBar
Component này bọc vào 1 scrollable để style cho scroll bar của nó theo ý
Ví dụ
import { ScrollBar } from '@xobuilder/ui';
const Demo = () => {
return (
<ScrollBar scrollableSelector=".Polaris-Scrollable">
<Scrollable style={{ height: 400 }}>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias aut aspernatur cupiditate itaque, quia provident voluptatem quos
exercitationem nihil, beatae vitae deserunt nesciunt, sequi vero ipsam qui libero! Impedit similique velit maxime quisquam libero aliquid
</Scrollable>
</ScrollBar>
);
};
Props
Name | Type | Default | Description |
---|---|---|---|
className | string | - | Classname của component |
style | CSSProperties | - | Style của component |
scrollableSelector | string | - | Selector của scrollable element |
thumbColor | string | '#c7c7c7' | Màu của scrollbar thumb |
thumbHoverColor | string | '#999' | Màu của scrollbar thumb khi hover |
trackColor | string | 'transparent' | Màu của scrollbar track |
scrollBarBorderRadius | number | 5 | Border radius của scrollbar |
scrollBarWidth | number | 10 | Độ rộng của scrollbar |
platform | `'mac' | 'win' | 'all'` |
children | ReactNode | - | Children nên chứa scrollable |