{wires.map(wire => (
diff --git a/tgui/packages/tgui/layouts/Layout.js b/tgui/packages/tgui/layouts/Layout.js
index a00115e5f9..cd253ae257 100644
--- a/tgui/packages/tgui/layouts/Layout.js
+++ b/tgui/packages/tgui/layouts/Layout.js
@@ -5,29 +5,15 @@
*/
import { classes } from 'common/react';
-import { computeBoxProps, computeBoxClassName } from '../components/Box';
-
-/**
- * Brings Layout__content DOM element back to focus.
- *
- * Commonly used to keep the content scrollable in IE.
- */
-export const refocusLayout = () => {
- // IE8: Focus method is seemingly fucked.
- if (Byond.IS_LTE_IE8) {
- return;
- }
- const element = document.getElementById('Layout__content');
- if (element) {
- element.focus();
- }
-};
+import { computeBoxClassName, computeBoxProps } from '../components/Box';
+import { addScrollableNode, removeScrollableNode } from '../events';
export const Layout = props => {
const {
className,
theme = 'nanotrasen',
children,
+ ...rest
} = props;
return (
@@ -35,7 +21,9 @@ export const Layout = props => {
className={classes([
'Layout',
className,
- ])}>
+ ...computeBoxClassName(rest),
+ ])}
+ {...computeBoxProps(rest)}>
{children}
@@ -51,7 +39,6 @@ const LayoutContent = props => {
} = props;
return (
{
);
};
+LayoutContent.defaultHooks = {
+ onComponentDidMount: node => addScrollableNode(node),
+ onComponentWillUnmount: node => removeScrollableNode(node),
+};
+
Layout.Content = LayoutContent;
diff --git a/tgui/packages/tgui/layouts/index.js b/tgui/packages/tgui/layouts/index.js
index 57d9f3ef0d..6e02bf74d0 100644
--- a/tgui/packages/tgui/layouts/index.js
+++ b/tgui/packages/tgui/layouts/index.js
@@ -4,6 +4,7 @@
* @license MIT
*/
-export { Layout, refocusLayout } from './Layout';
+export { Layout } from './Layout';
export { NtosWindow } from './NtosWindow';
+export { Pane } from './Pane';
export { Window } from './Window';