Skip to content
Snippets Groups Projects

Main

Closed Eryk Mika requested to merge main into just_for_review
1 file
+ 18
5
Compare changes
  • Side-by-side
  • Inline
+ 18
5
@@ -44,6 +44,7 @@ export default function FlexibleTable({attributes, setAttributes, placeholders,
bodyBackground,
multipleBodyBackground,
bodyBackgroundOdd,
bodyTextColorOdd,
bodyTextColor,
bodyTextAlign,
bodyFontWeight,
@@ -235,13 +236,13 @@ export default function FlexibleTable({attributes, setAttributes, placeholders,
</PanelBody>
<PanelBody title={__('Body appearance', 'flexible-invoices-core')}>
<ColorSelector
label={__('Text Color', 'flexible-invoices-core')}
label={__('Text color', 'flexible-invoices-core')}
value={bodyTextColor}
enableAlpha={false}
onChange={(value) => setAttributes({bodyTextColor: value})}
/>
<ColorSelector
label={__('Background Color', 'flexible-invoices-core')}
label={__('Background color', 'flexible-invoices-core')}
value={bodyBackground}
enableAlpha={false}
onChange={(value) => setAttributes({bodyBackground: value})}
@@ -253,11 +254,23 @@ export default function FlexibleTable({attributes, setAttributes, placeholders,
onChange={(newValue) => setAttributes({multipleBodyBackground: newValue})}
/>
{multipleBodyBackground ? <ColorSelector
{multipleBodyBackground ?
<>
<ColorSelector
label={__('Background color (odd rows)', 'flexible-invoices-core')}
value={bodyBackgroundOdd}
onChange={(value) => setAttributes({bodyBackgroundOdd: value})}
/> : ''}
/>
<ColorSelector
label={__('Text color (odd rows)', 'flexible-invoices-core')}
value={bodyTextColorOdd}
enableAlpha={false}
onChange={(value) => setAttributes({bodyTextColorOdd: value})}
/>
</>
: ''
}
<NumberWithUnit
label={__('Font size', 'flexible-invoices-core')}
@@ -398,7 +411,7 @@ export default function FlexibleTable({attributes, setAttributes, placeholders,
key={index}
value={row}
style={{
color: bodyTextColor,
color: (multipleBodyBackground && index === 1) ? bodyTextColorOdd : bodyTextColor,
textAlign: bodyTextAlign,
fontStyle: bodyFontStyle,
fontSize: bodyFontSize,
Loading