umami/components/layout/PageHeader.js

13 lines
381 B
JavaScript
Raw Normal View History

2020-08-07 09:24:01 +02:00
import React, { Children } from 'react';
import styles from './PageHeader.module.css';
export default function PageHeader({ children }) {
const [firstChild, ...otherChildren] = Children.toArray(children);
return (
<div className={styles.header}>
<div className={styles.title}> {firstChild}</div>
{otherChildren && <div>{otherChildren}</div>}
</div>
);
}