1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/elements/ItemsContainerElement.tsx

29 lines
608 B
TypeScript
Raw Normal View History

2022-10-02 19:07:42 +03:00
import React, { FC } from 'react';
2022-08-06 01:36:13 +03:00
const createElement = ({ className, dataId }: IProps) => ({
2022-08-06 01:36:13 +03:00
__html: `<div
is="emby-itemscontainer"
class="${className}"
${dataId}
2022-08-06 01:36:13 +03:00
>
</div>`
});
2022-10-02 19:07:42 +03:00
interface IProps {
2022-08-06 01:36:13 +03:00
className?: string;
dataId?: string;
2022-08-06 01:36:13 +03:00
}
const ItemsContainerElement: FC<IProps> = ({ className, dataId }) => {
2022-08-06 01:36:13 +03:00
return (
<div
2022-08-07 02:33:25 +03:00
dangerouslySetInnerHTML={createElement({
className: className,
dataId: dataId ? `data-id="${dataId}"` : ''
2022-08-06 01:36:13 +03:00
})}
/>
);
};
export default ItemsContainerElement;