//
// Copyright 2023 DXOS.org
//
import { type Decorator } from '@storybook/react';
import React, { type ComponentType, type PropsWithChildren } from 'react';
import { mx, surfaceShadow } from '@dxos/ui-theme';
import { type Density, type Elevation } from '@dxos/ui-types';
type Config = {
elevations?: { elevation: Elevation; surface?: string }[];
densities?: Density[];
};
const Container = ({ children, elevation, surface }: PropsWithChildren<{ elevation: Elevation; surface?: string }>) => (
{children}
);
const Panel = ({
Story,
elevations,
densities,
className,
}: { Story: ComponentType } & Config & { className?: string }) => {
return (
{elevations?.map(({ elevation, surface }) =>
densities?.map((density) => (
)),
)}
);
};
export const withLayoutVariants = ({
elevations = [
{ elevation: 'dialog', surface: 'bg-modal-surface' },
{ elevation: 'positioned', surface: 'bg-card-surface' },
{ elevation: 'base', surface: 'bg-base-surface' },
],
densities = ['md'],
}: Config = {}): Decorator => {
return (Story) => ;
};