signal-desktop/ts/test-both/helpers/FakeLeftPaneContainer.tsx

31 lines
685 B
TypeScript
Raw Normal View History

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