Skip to content
Snippets Groups Projects
Commit ba565222 authored by Eryk Mika's avatar Eryk Mika
Browse files

fix: even rows not odd lol

parent a4efbb0d
Branches
Tags
1 merge request!1Main
Pipeline #479236 failed
...@@ -43,8 +43,8 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, ...@@ -43,8 +43,8 @@ export default function FlexibleTable({attributes, setAttributes, placeholders,
bodyBackground, bodyBackground,
multipleBodyBackground, multipleBodyBackground,
bodyBackgroundOdd, bodyBackgroundEven,
bodyTextColorOdd, bodyTextColorEven,
bodyTextColor, bodyTextColor,
bodyTextAlign, bodyTextAlign,
bodyFontWeight, bodyFontWeight,
...@@ -257,15 +257,15 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, ...@@ -257,15 +257,15 @@ export default function FlexibleTable({attributes, setAttributes, placeholders,
{multipleBodyBackground ? {multipleBodyBackground ?
<> <>
<ColorSelector <ColorSelector
label={__('Background color (odd rows)', 'flexible-invoices-core')} label={__('Background color (even rows)', 'flexible-invoices-core')}
value={bodyBackgroundOdd} value={bodyBackgroundEven}
onChange={(value) => setAttributes({bodyBackgroundOdd: value})} onChange={(value) => setAttributes({bodyBackgroundEven: value})}
/> />
<ColorSelector <ColorSelector
label={__('Text color (odd rows)', 'flexible-invoices-core')} label={__('Text color (even rows)', 'flexible-invoices-core')}
value={bodyTextColorOdd} value={bodyTextColorEven}
enableAlpha={false} enableAlpha={false}
onChange={(value) => setAttributes({bodyTextColorOdd: value})} onChange={(value) => setAttributes({bodyTextColorEven: value})}
/> />
</> </>
: '' : ''
...@@ -387,7 +387,7 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, ...@@ -387,7 +387,7 @@ export default function FlexibleTable({attributes, setAttributes, placeholders,
{Array.from({length: 2}).map((_, trIndex) => ( {Array.from({length: 2}).map((_, trIndex) => (
<tr className={"fitb-item-table-row"} style={{ <tr className={"fitb-item-table-row"} style={{
background: (multipleBodyBackground && trIndex === 1) ? bodyBackgroundOdd : bodyBackground, background: (multipleBodyBackground && trIndex === 1) ? bodyBackgroundEven : bodyBackground,
borderStyle: "solid", borderStyle: "solid",
borderColor: bodyBorderRowColor, borderColor: bodyBorderRowColor,
borderTopWidth: bodyBorderRowWidthTop, borderTopWidth: bodyBorderRowWidthTop,
...@@ -411,7 +411,7 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, ...@@ -411,7 +411,7 @@ export default function FlexibleTable({attributes, setAttributes, placeholders,
key={index} key={index}
value={row} value={row}
style={{ style={{
color: (multipleBodyBackground && trIndex === 1) ? bodyTextColorOdd : bodyTextColor, color: (multipleBodyBackground && trIndex === 1) ? bodyTextColorEven : bodyTextColor,
textAlign: bodyTextAlign, textAlign: bodyTextAlign,
fontStyle: bodyFontStyle, fontStyle: bodyFontStyle,
fontSize: bodyFontSize, fontSize: bodyFontSize,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment