getScrollClass()function
getScrollClass({ horizontal, vertical }: ScrollVariants): string| Param | Type | |
|---|---|---|
variants | ScrollVariants | Variant props selecting which scroll axes are enabled on an element. required |
.vertical | boolean | Vertical scrolling (defaults to false). |
.horizontal | boolean | Horizontal scrolling (defaults to false). |
| Return | |
|---|---|
string | The combined scroll class string (empty when neither axis is enabled). |
Get the scroll class for a component from its horizontal / vertical variant props.
Examples
getScrollClass({ horizontal: true }) // "horizontal"