mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
30 lines
608 B
TypeScript
30 lines
608 B
TypeScript
import React from 'react';
|
|
|
|
import { useStyles2 } from '../../themes';
|
|
import { IconName } from '../../types';
|
|
|
|
import { getModalStyles } from './getModalStyles';
|
|
|
|
interface Props {
|
|
title: string;
|
|
id?: string;
|
|
/** @deprecated */
|
|
icon?: IconName;
|
|
/** @deprecated */
|
|
iconTooltip?: string;
|
|
}
|
|
|
|
/** @internal */
|
|
export const ModalHeader = ({ icon, iconTooltip, title, children, id }: React.PropsWithChildren<Props>) => {
|
|
const styles = useStyles2(getModalStyles);
|
|
|
|
return (
|
|
<>
|
|
<h2 className={styles.modalHeaderTitle} id={id}>
|
|
{title}
|
|
</h2>
|
|
{children}
|
|
</>
|
|
);
|
|
};
|