diff --git a/code/frontend/src/components/BoxFullScrollable.js b/code/frontend/src/components/BoxFullScrollable.js new file mode 100644 index 0000000..6fad196 --- /dev/null +++ b/code/frontend/src/components/BoxFullScrollable.js @@ -0,0 +1,29 @@ +import React from "react" +import Style from "./BoxFullScrollable.module.css" +import classNames from "classnames" +import BoxFull from "./BoxFull" + + +/** + * A {@link BoxFull} whose body does not grow automatically but instead supports scrolling. + * + * @todo Is there a way to allow the box body to grow automatically...? + * + * @param children - The contents of the box body. + * @param childrenClassName - Additional class(es) added to the inner `
` acting as the body. + * @param height - The fixed height of the box body. + * @param props - Additional props to pass to the box. + * @returns {JSX.Element} + * @constructor + */ +export default function BoxFullScrollable({ children, childrenClassName, height, ...props }) { + return ( + + {children} + + ) +} diff --git a/code/frontend/src/components/BoxFullScrollable.module.css b/code/frontend/src/components/BoxFullScrollable.module.css new file mode 100644 index 0000000..e2a4b01 --- /dev/null +++ b/code/frontend/src/components/BoxFullScrollable.module.css @@ -0,0 +1,5 @@ +.ScrollableBody { + flex-grow: 0; + + overflow-y: scroll; +}