import React from "react"; import { H2 } from "../../typography"; import { useDataGridContext } from "./datagridcontext"; /** * DataGrid header, shows title as either string or JSX. */ export const DataGridHeader = < T extends object = object, F extends object = T, >() => { const { title, titleId } = useDataGridContext(); return (
{typeof title === "string" ? (

{title}

) : ( title )}
); };