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

Update to React 18

This commit is contained in:
grafixeyehero 2024-06-02 20:58:11 +03:00
parent b5d6e37fb3
commit be891c3a98
36 changed files with 339 additions and 311 deletions

View file

@ -1,8 +1,8 @@
import React, { FunctionComponent } from 'react';
import React, { type FC, type PropsWithChildren } from 'react';
import globalize from '../../../scripts/globalize';
import CheckBoxElement from '../../../elements/CheckBoxElement';
type IProps = {
interface AccessContainerProps {
containerClassName?: string;
headerTitle?: string;
checkBoxClassName?: string;
@ -11,10 +11,19 @@ type IProps = {
accessClassName?: string;
listTitle?: string;
description?: string;
children?: React.ReactNode
};
}
const AccessContainer: FunctionComponent<IProps> = ({ containerClassName, headerTitle, checkBoxClassName, checkBoxTitle, listContainerClassName, accessClassName, listTitle, description, children }: IProps) => {
const AccessContainer: FC<PropsWithChildren<AccessContainerProps>> = ({
containerClassName,
headerTitle,
checkBoxClassName,
checkBoxTitle,
listContainerClassName,
accessClassName,
listTitle,
description,
children
}) => {
return (
<div className={containerClassName}>
<h2>{globalize.translate(headerTitle)}</h2>
@ -28,9 +37,12 @@ const AccessContainer: FunctionComponent<IProps> = ({ containerClassName, header
<h3 className='checkboxListLabel'>
{globalize.translate(listTitle)}
</h3>
<div className='checkboxList paperList' style={{
padding: '.5em 1em'
}}>
<div
className='checkboxList paperList'
style={{
padding: '.5em 1em'
}}
>
{children}
</div>
</div>