mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 21:27:20 +01:00
18 lines
615 B
JavaScript
18 lines
615 B
JavaScript
import classNames from 'classnames';
|
|
import { mapChildren } from 'react-basics';
|
|
import styles from './Grid.module.css';
|
|
|
|
export function Grid({ className, ...otherProps }) {
|
|
return <div {...otherProps} className={classNames(styles.grid, className)} />;
|
|
}
|
|
|
|
export function GridRow(props) {
|
|
const { columns = 'two', className, children, ...otherProps } = props;
|
|
return (
|
|
<div {...otherProps} className={classNames(styles.row, className)}>
|
|
{mapChildren(children, child => {
|
|
return <div className={classNames(styles.col, { [styles[columns]]: true })}>{child}</div>;
|
|
})}
|
|
</div>
|
|
);
|
|
}
|