mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use interface over type
This commit is contained in:
parent
9d88af3dfe
commit
de4a359c98
21 changed files with 100 additions and 106 deletions
|
@ -1,24 +1,21 @@
|
|||
import React, { FunctionComponent } from 'react';
|
||||
import React, { FC } from 'react';
|
||||
|
||||
const createElement = ({ id, className }: IProps) => ({
|
||||
const createElement = ({ className }: IProps) => ({
|
||||
__html: `<div
|
||||
is="emby-itemscontainer"
|
||||
${id}
|
||||
class="${className}"
|
||||
>
|
||||
</div>`
|
||||
});
|
||||
|
||||
type IProps = {
|
||||
id?: string;
|
||||
interface IProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const ItemsContainerElement: FunctionComponent<IProps> = ({ id, className }: IProps) => {
|
||||
const ItemsContainerElement: FC<IProps> = ({ className }) => {
|
||||
return (
|
||||
<div
|
||||
dangerouslySetInnerHTML={createElement({
|
||||
id: id ? `id='${id}'` : '',
|
||||
className: className
|
||||
})}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue