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

42 lines
1.5 KiB
TypeScript
Raw Normal View History

import React, { FunctionComponent } from 'react';
import globalize from '../../../scripts/globalize';
import CheckBoxElement from './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
}
2022-05-09 20:11:47 +03: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>
<CheckBoxElement labelClassName='checkboxContainer' type='checkbox' className={checkBoxClassName} title={checkBoxTitle} />
<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;