Skip to content

Commit

Permalink
Removed junk code
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Mar 22, 2021
1 parent e67c4d5 commit baad1af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
9 changes: 1 addition & 8 deletions src/BlockStyleWrapper/BlockStyleWrapperEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ import { Portal } from 'react-portal';
import themeSVG from '@plone/volto/icons/theme.svg';
import { Icon } from '@plone/volto/components';
import config from '@plone/volto/registry';
import cx from 'classnames';

// For blocks, store the style data in data.styles, then
// adapt the data.styles.[align,size,...] info to default data.align, data.size, etc.

const BlockStyleWrapperEdit = (props) => {
const { selected, block, data = {}, onChangeBlock, manage } = props;
const [isVisible, setIsVisible] = React.useState(false);
const stylesButton = React.useRef(null);
const visible =
selected && (config.settings.layoutOnlyBlockStyles ? manage : true);

Expand All @@ -24,12 +22,7 @@ const BlockStyleWrapperEdit = (props) => {

const triggerButton = (
<Portal node={tabsNode}>
<div
className={cx({
'open-styles-button': true,
})}
ref={stylesButton}
>
<div className="open-styles-button">
<button
onClick={() => {
setIsVisible(true);
Expand Down
2 changes: 1 addition & 1 deletion src/SidebarPopup/SidebarPopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const SidebarPopup = (props, ref) => {
}}
ref={ref}
key="sidebarpopup"
className="sidebar-container shit"
className="sidebar-container"
style={{ overflowY: 'auto' }}
>
{children}
Expand Down
3 changes: 2 additions & 1 deletion src/StyleWrapper/StyleWrapperEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ const StyleWrapperEdit = (props) => {
isVisible &&
!containClick &&
!doesNodeContainClick(nodeRef.current, e)
)
) {
setIsVisible(false);
}
},
[isVisible, setIsVisible],
);
Expand Down

0 comments on commit baad1af

Please sign in to comment.