Sanghyeon Lee 96cea9b84b
Make left panel height flexible to avoid overflow (#1169)
* Make overall left menu scrollable

* Make only mid-left panel scrollable

* Update src/styles.scss

* Update src/styles.scss

* Update src/components/LayerUI.tsx

* Remove unused class

* Move the scrolling role to Island

Co-authored-by: Lipis <lipiridis@gmail.com>
2020-04-03 13:58:50 -04:00

22 lines
439 B
TypeScript

import "./Island.css";
import React from "react";
type IslandProps = {
children: React.ReactNode;
padding?: number;
className?: string;
};
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
({ children, padding, className }, ref) => (
<div
className={`${className ?? ""} Island`}
style={{ "--padding": padding } as React.CSSProperties}
ref={ref}
>
{children}
</div>
),
);