Files
Desktop/ts/test-helpers/FakeLeftPaneContainer.dom.tsx
Jamie b405e3d83d Prepare for upgrade to React 19
Co-authored-by: ayumi-signal <ayumi@signal.org>
2025-12-23 13:42:56 -08:00

31 lines
695 B
TypeScript

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import { WidthBreakpoint } from '../components/_util.std.js';
type PropsType = {
children?: React.ReactNode;
containerWidthBreakpoint: WidthBreakpoint;
};
const WIDTHS = {
[WidthBreakpoint.Wide]: 350,
[WidthBreakpoint.Medium]: 280,
[WidthBreakpoint.Narrow]: 130,
};
export function FakeLeftPaneContainer({
children,
containerWidthBreakpoint,
}: PropsType): React.JSX.Element {
return (
<div
className={`module-left-pane--width-${containerWidthBreakpoint}`}
style={{ width: WIDTHS[containerWidthBreakpoint] }}
>
{children}
</div>
);
}