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

46 lines
1.6 KiB
TypeScript
Raw Normal View History

import React, { FunctionComponent } from 'react';
import globalize from '../../../scripts/globalize';
2022-06-29 18:26:33 +03:00
import CheckBoxElement from '../../../elements/CheckBoxElement';
type IProps = {
2022-05-09 20:11:47 +03:00
containerClassName?: string;
headerTitle?: string;
checkBoxClassName?: string;
checkBoxTitle?: string;
listContainerClassName?: string;
accessClassName?: string;
listTitle?: string;
description?: string;
children?: React.ReactNode
}
2023-03-29 00:38:22 -04:00
const AccessContainer: FunctionComponent<IProps> = ({ containerClassName, headerTitle, checkBoxClassName, checkBoxTitle, listContainerClassName, accessClassName, listTitle, description, children }: IProps) => {
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>
<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;