Files
jellyfin-web/src/components/listview/List/ListGroupHeaderWrapper.tsx
grafixeyehero 533ae17767 Use type import for react FC
Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
2024-02-28 21:02:05 +03:00

31 lines
700 B
TypeScript

import React, { type FC } from 'react';
import Typography from '@mui/material/Typography';
interface ListGroupHeaderWrapperProps {
index?: number;
}
const ListGroupHeaderWrapper: FC<ListGroupHeaderWrapperProps> = ({
index,
children
}) => {
if (index === 0) {
return (
<Typography
className='listGroupHeader listGroupHeader-first'
variant='h2'
>
{children}
</Typography>
);
} else {
return (
<Typography className='listGroupHeader' variant='h2'>
{children}
</Typography>
);
}
};
export default ListGroupHeaderWrapper;