mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Convert ListView to react
This commit is contained in:
parent
cc87ba3859
commit
9efc71fa3b
14 changed files with 1009 additions and 0 deletions
34
src/components/listview/List/ListContentWrapper.tsx
Normal file
34
src/components/listview/List/ListContentWrapper.tsx
Normal file
|
@ -0,0 +1,34 @@
|
|||
import React, { FC } from 'react';
|
||||
import Box from '@mui/material/Box';
|
||||
|
||||
interface ListContentWrapperProps {
|
||||
itemOverview: string | null | undefined;
|
||||
enableContentWrapper?: boolean;
|
||||
enableOverview?: boolean;
|
||||
}
|
||||
|
||||
const ListContentWrapper: FC<ListContentWrapperProps> = ({
|
||||
itemOverview,
|
||||
enableContentWrapper,
|
||||
enableOverview,
|
||||
children
|
||||
}) => {
|
||||
if (enableContentWrapper) {
|
||||
return (
|
||||
<>
|
||||
<Box className='listItem-content'>{children}</Box>
|
||||
|
||||
{enableOverview && itemOverview && (
|
||||
<Box className='listItem-bottomoverview secondary'>
|
||||
<bdi>{itemOverview}</bdi>
|
||||
</Box>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
// eslint-disable-next-line react/jsx-no-useless-fragment
|
||||
return <>{children}</>;
|
||||
}
|
||||
};
|
||||
|
||||
export default ListContentWrapper;
|
Loading…
Add table
Add a link
Reference in a new issue