Skip to content

Commit

Permalink
pass style prop to LegacyWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
danalvrz committed Oct 23, 2024
1 parent ee054f7 commit 085eb79
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/volto-separator-block/src/components/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ import React from 'react';
import cx from 'classnames';
import { MaybeWrap } from '@plone/volto/components';

const LegacyWrapper = ({ className, children }) => (
<div className={cx('block separator', className)}>{children}</div>
const LegacyWrapper = (props) => (
<div className={cx('block separator', props.className)} style={props.style}>{children}</div>

Check failure on line 6 in packages/volto-separator-block/src/components/View.jsx

View workflow job for this annotation

GitHub Actions / codeanalysis

Replace `{children}` with `⏎····{children}⏎··`

Check failure on line 6 in packages/volto-separator-block/src/components/View.jsx

View workflow job for this annotation

GitHub Actions / codeanalysis

'children' is not defined
);

const SeparatorView = ({ data, isEditMode, className, blocksConfig }) => {
const SeparatorView = (props) => {
const { blocksConfig } = props;
const isBlockModelv3 = blocksConfig?.separator?.blockModel === 3;
return (
<MaybeWrap

Check failure on line 13 in packages/volto-separator-block/src/components/View.jsx

View workflow job for this annotation

GitHub Actions / codeanalysis

Replace `⏎······condition={!isBlockModelv3}⏎······as={LegacyWrapper}⏎······{...props}⏎····` with `·condition={!isBlockModelv3}·as={LegacyWrapper}·{...props}`
condition={!isBlockModelv3}
as={LegacyWrapper}
className={className}
{...props}
>
<div className="line" />
<div className="line testclass" />
</MaybeWrap>
);
};
Expand Down

0 comments on commit 085eb79

Please sign in to comment.