forked from pterodactyl/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChartBlock.tsx
More file actions
19 lines (17 loc) · 722 Bytes
/
ChartBlock.tsx
File metadata and controls
19 lines (17 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import React from 'react';
import classNames from 'classnames';
import styles from '@/components/server/console/style.module.css';
interface ChartBlockProps {
title: string;
legend?: React.ReactNode;
children: React.ReactNode;
}
export default ({ title, legend, children }: ChartBlockProps) => (
<div className={classNames(styles.chart_container, 'group')}>
<div className={'flex items-center justify-between px-4 py-2'}>
<h3 className={'font-header transition-colors duration-100 group-hover:text-gray-50'}>{title}</h3>
{legend && <p className={'text-sm flex items-center'}>{legend}</p>}
</div>
<div className={'z-10 ml-2'}>{children}</div>
</div>
);