2023-10-06 13:44:06 +11:00
|
|
|
import React, { ReactNode } from 'react';
|
|
|
|
|
import { Box, as } from 'folds';
|
|
|
|
|
import * as css from './layout.css';
|
|
|
|
|
|
|
|
|
|
type CompactLayoutProps = {
|
|
|
|
|
before?: ReactNode;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const CompactLayout = as<'div', CompactLayoutProps>(
|
|
|
|
|
({ before, children, ...props }, ref) => (
|
|
|
|
|
<Box gap="200" {...props} ref={ref}>
|
|
|
|
|
<Box className={css.CompactHeader} gap="200" shrink="No">
|
|
|
|
|
{before}
|
|
|
|
|
</Box>
|
|
|
|
|
{children}
|
|
|
|
|
</Box>
|
2026-05-21 23:30:50 -04:00
|
|
|
),
|
2023-10-06 13:44:06 +11:00
|
|
|
);
|