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

58 lines
1.7 KiB
TypeScript
Raw Normal View History

2024-06-02 20:58:11 +03:00
import React, { type FC, type PropsWithChildren } from 'react';
2024-08-14 13:31:34 -04:00
import globalize from '../../../lib/globalize';
2022-06-29 18:26:33 +03:00
import CheckBoxElement from '../../../elements/CheckBoxElement';
2024-06-02 20:58:11 +03:00
interface AccessContainerProps {
2022-05-09 20:11:47 +03:00
containerClassName?: string;
headerTitle?: string;
checkBoxClassName?: string;
checkBoxTitle?: string;
listContainerClassName?: string;
accessClassName?: string;
listTitle?: string;
description?: string;
2024-06-02 20:58:11 +03:00
}
2024-06-02 20:58:11 +03:00
const AccessContainer: FC<PropsWithChildren<AccessContainerProps>> = ({
containerClassName,
headerTitle,
checkBoxClassName,
checkBoxTitle,
listContainerClassName,
accessClassName,
listTitle,
description,
children
}) => {
return (
2022-05-09 20:11:47 +03:00
<div className={containerClassName}>
<h2>{globalize.translate(headerTitle)}</h2>
2022-06-29 02:17:10 +03:00
<CheckBoxElement
labelClassName='checkboxContainer'
className={checkBoxClassName}
title={checkBoxTitle}
/>
2022-05-09 20:11:47 +03:00
<div className={listContainerClassName}>
<div className={accessClassName}>
<h3 className='checkboxListLabel'>
2022-05-09 20:11:47 +03:00
{globalize.translate(listTitle)}
</h3>
2024-06-02 20:58:11 +03:00
<div
className='checkboxList paperList'
style={{
padding: '.5em 1em'
}}
>
{children}
</div>
</div>
<div className='fieldDescription'>
2022-05-09 20:11:47 +03:00
{globalize.translate(description)}
</div>
</div>
</div>
);
};
export default AccessContainer;