2021-04-23 17:08:17 +00:00
|
|
|
import React from "react"
|
|
|
|
import Style from "./BoxFullScrollable.module.css"
|
|
|
|
import classNames from "classnames"
|
|
|
|
import BoxFull from "./BoxFull"
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2021-04-26 16:36:41 +00:00
|
|
|
* A {@link BoxFull} whose body supports scrolling.
|
2021-04-23 17:08:17 +00:00
|
|
|
*
|
|
|
|
* @param children - The contents of the box body.
|
|
|
|
* @param childrenClassName - Additional class(es) added to the inner `<div>` acting as the body.
|
|
|
|
* @param props - Additional props to pass to the box.
|
|
|
|
* @returns {JSX.Element}
|
|
|
|
* @constructor
|
|
|
|
*/
|
2021-04-23 22:27:35 +00:00
|
|
|
export default function BoxFullScrollable({ children, childrenClassName, ...props }) {
|
2021-04-23 17:08:17 +00:00
|
|
|
return (
|
2021-04-23 22:27:35 +00:00
|
|
|
<BoxFull childrenClassName={classNames(Style.BoxScrollableBody, childrenClassName)} {...props}>
|
|
|
|
<div className={classNames(Style.ScrollContainer)}>
|
|
|
|
{children}
|
|
|
|
</div>
|
2021-04-23 17:08:17 +00:00
|
|
|
</BoxFull>
|
|
|
|
)
|
|
|
|
}
|