umami/components/metrics/WebsiteHeader.js

21 lines
730 B
JavaScript
Raw Normal View History

import { Row, Column } from 'react-basics';
import Favicon from 'components/common/Favicon';
import OverflowText from 'components/common/OverflowText';
2020-08-18 09:51:32 +02:00
import ActiveUsers from './ActiveUsers';
import styles from './WebsiteHeader.module.css';
2023-02-02 03:39:54 +01:00
export default function WebsiteHeader({ websiteId, title, domain, children }) {
2020-08-18 09:51:32 +02:00
return (
2023-02-02 03:39:54 +01:00
<Row className={styles.header} justifyContent="center">
<Column className={styles.title} variant="two">
<Favicon domain={domain} />
<OverflowText tooltipId={`${websiteId}-title`}>{title}</OverflowText>
</Column>
<Column className={styles.body} variant="two">
<ActiveUsers websiteId={websiteId} />
{children}
</Column>
</Row>
2020-08-18 09:51:32 +02:00
);
}