mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 04:54:18 +00:00
✨ Complete BoxFullScrollable !
This commit is contained in:
parent
ff35676781
commit
09d84eeae8
2 changed files with 25 additions and 10 deletions
|
@ -11,19 +11,16 @@ import BoxFull from "./BoxFull"
|
|||
*
|
||||
* @param children - The contents of the box body.
|
||||
* @param childrenClassName - Additional class(es) added to the inner `<div>` 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 }) {
|
||||
export default function BoxFullScrollable({ children, childrenClassName, ...props }) {
|
||||
return (
|
||||
<BoxFull
|
||||
childrenClassName={classNames(Style.ScrollableBody, childrenClassName)}
|
||||
childrenProps={{"style": {"height": height}}}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<BoxFull childrenClassName={classNames(Style.BoxScrollableBody, childrenClassName)} {...props}>
|
||||
<div className={classNames(Style.ScrollContainer)}>
|
||||
{children}
|
||||
</div>
|
||||
</BoxFull>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,23 @@
|
|||
.ScrollableBody {
|
||||
flex-grow: 0;
|
||||
.BoxScrollableBody {
|
||||
position: relative;
|
||||
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
|
||||
.ScrollContainer {
|
||||
position: absolute;
|
||||
|
||||
padding: 10px 40px;
|
||||
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
overflow-y: scroll;
|
||||
|
||||
/* Custom scrollbar (firefox only!) */
|
||||
scrollbar-color: var(--bg-light) var(--bg-dark);
|
||||
scrollbar-width: auto;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue