umami/components/layout/PageHeader.js

16 lines
468 B
JavaScript
Raw Normal View History

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