umami/components/layout/PageHeader.js

16 lines
468 B
JavaScript
Raw Normal View History

import React from 'react';
2020-09-22 06:34:55 +02:00
import classNames from 'classnames';
2023-04-10 05:22:28 +02:00
import { useBreakpoint } from 'react-basics';
2020-08-07 09:24:01 +02:00
import styles from './PageHeader.module.css';
2023-04-10 05:22:28 +02:00
export default function PageHeader({ title, children }) {
const breakPoint = useBreakpoint();
return (
2023-04-10 05:22:28 +02:00
<div className={classNames(styles.header, { [styles[breakPoint]]: true })}>
2023-01-31 06:44:07 +01:00
<div className={styles.title}>{title}</div>
2023-04-10 05:22:28 +02:00
<div className={styles.actions}>{children}</div>
</div>
);
2020-08-07 09:24:01 +02:00
}