mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Updated reports components.
This commit is contained in:
parent
f5bc3dc6c2
commit
0f6cdf8b80
95 changed files with 580 additions and 698 deletions
23
src/components/common/GridRow.tsx
Normal file
23
src/components/common/GridRow.tsx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { Grid } from '@umami/react-zen';
|
||||
|
||||
const LAYOUTS = {
|
||||
one: { columns: '1fr' },
|
||||
two: { columns: { xs: '1fr', sm: '1fr', md: '1fr 1fr', lg: '1fr 1fr' } },
|
||||
three: { columns: { xs: '1fr', sm: '1fr', md: '1fr 1fr 1fr', lg: '1fr 2fr' } },
|
||||
'one-two': { columns: { xs: '1fr', sm: '1fr', md: '1fr 2fr', lg: '1fr 2fr' } },
|
||||
'two-one': { columns: { xs: '1fr', sm: '1fr', md: '2fr 1fr', lg: '2fr 1fr', xl: '2fr 1fr' } },
|
||||
};
|
||||
|
||||
export function GridRow(props: {
|
||||
[x: string]: any;
|
||||
layout?: 'one' | 'two' | 'three' | 'one-two' | 'two-one' | 'compare';
|
||||
className?: string;
|
||||
children?: any;
|
||||
}) {
|
||||
const { layout = 'two', children, ...otherProps } = props;
|
||||
return (
|
||||
<Grid gap="3" {...LAYOUTS[layout]} {...otherProps}>
|
||||
{children}
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue