diff --git a/app/components/editors/p8p_editor_sub_header.js b/app/components/editors/p8p_editor_sub_header.js index de7f4f6..00b2d8c 100644 --- a/app/components/editors/p8p_editor_sub_header.js +++ b/app/components/editors/p8p_editor_sub_header.js @@ -17,7 +17,8 @@ import { Divider, Chip } from "@mui/material"; //Интерфейсные ком //Стили const STYLES = { - DIVIDER: pt => ({ paddingTop: pt || pt === 0 ? `${pt}px` : "20px" }) + DIVIDER: pt => ({ paddingTop: pt || pt === 0 ? `${pt}px` : "20px" }), + CHIP: maxWidth => ({ cursor: "default", ...(maxWidth ? { maxWidth } : {}) }) }; //----------- @@ -25,11 +26,11 @@ const STYLES = { //----------- //Заголовок раздела редактора -const P8PEditorSubHeader = ({ title, paddingTop }) => { +const P8PEditorSubHeader = ({ title, paddingTop, maxWidth }) => { //Формирование представления return ( - + ); }; @@ -37,7 +38,8 @@ const P8PEditorSubHeader = ({ title, paddingTop }) => { //Контроль свойств компонента - Заголовок раздела редактора P8PEditorSubHeader.propTypes = { title: PropTypes.string.isRequired, - paddingTop: PropTypes.number + paddingTop: PropTypes.number, + maxWidth: PropTypes.string }; //----------------