Disable button in doc

This commit is contained in:
ShimaginAndrey 2021-05-31 12:51:18 +03:00
parent 552362ed55
commit 06da18294a
2 changed files with 7 additions and 1 deletions

View file

@ -507,6 +507,10 @@ const EditShape = props => {
const storeShapeSettings = props.storeShapeSettings;
const shapeObject = props.storeFocusObjects.shapeObject;
const wrapType = storeShapeSettings.getWrapType(shapeObject);
let setDisabled = true;
props.storeFocusObjects.paragraphObject ? setDisabled = true : setDisabled = false;
return (
<Fragment>
<List>
@ -537,7 +541,8 @@ const EditShape = props => {
}}></ListItem>
</List>
<List>
<ListButton title={_t.textRemoveShape} onClick={() => {props.onRemoveShape()}} className='button-red button-fill button-raised'/>
<ListButton title={_t.textRemoveShape} onClick={() => {props.onRemoveShape()}}
className={`button-red button-fill button-raised ${setDisabled ? 'disabled' : ''}`} />
</List>
</Fragment>
)

View file

@ -11,6 +11,7 @@ const EditShape = props => {
const storeFocusObjects = props.storeFocusObjects;
const shapeObject = storeFocusObjects.shapeObject;
const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill();
let setDisabled = true;
return (
<Fragment>