Refactor buttons.

This commit is contained in:
Mike Cao committed 2020-08-07 00:24:01 -07:00
1 parent 000f84df96
commit 30b87bc4c4
16 files changed
+175 -63

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
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>
);
}