From 65133353e2334a06ad077346df971d4a3784b8b7 Mon Sep 17 00:00:00 2001 From: Eryk Mika <eryk.mika@wpdesk.eu> Date: Wed, 5 Mar 2025 16:01:31 +0100 Subject: [PATCH] fix: return format for border colors as it is Alpha is not supported by mpdf --- src/FlexibleTable/FlexibleTable.jsx | 34 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/FlexibleTable/FlexibleTable.jsx b/src/FlexibleTable/FlexibleTable.jsx index 4296e7a..f10770d 100644 --- a/src/FlexibleTable/FlexibleTable.jsx +++ b/src/FlexibleTable/FlexibleTable.jsx @@ -205,10 +205,10 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, label={__("Border row width", 'flexible-invoices-core')} values={ { - headerBorderRowWidthTop: headerBorderRowWidthTop, - headerBorderRowWidthLeft: headerBorderRowWidthLeft, - headerBorderRowWidthRight: headerBorderRowWidthRight, - headerBorderRowWidthBottom: headerBorderRowWidthBottom, + headerBorderRowWidthTop, + headerBorderRowWidthLeft, + headerBorderRowWidthRight, + headerBorderRowWidthBottom, } } onChange={handleMultipleAttributesChange} @@ -224,10 +224,10 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, label={__("Border cell width", 'flexible-invoices-core')} values={ { - headerBorderCellWidthTop: headerBorderCellWidthTop, - headerBorderCellWidthLeft: headerBorderCellWidthLeft, - headerBorderCellWidthRight: headerBorderCellWidthRight, - headerBorderCellWidthBottom: headerBorderCellWidthBottom, + headerBorderCellWidthTop, + headerBorderCellWidthLeft, + headerBorderCellWidthRight, + headerBorderCellWidthBottom, } } onChange={handleMultipleAttributesChange} @@ -301,16 +301,17 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, label={__('Border row color', 'flexible-invoices-core')} value={bodyBorderRowColor} enableAlpha={false} + returnFormat={'hex'} onChange={(value) => setAttributes({bodyBorderRowColor: value})} /> <QuatroInput label={__("Border row width", 'flexible-invoices-core')} values={ { - bodyBorderRowWidthTop: bodyBorderRowWidthTop, - bodyBorderRowWidthLeft: bodyBorderRowWidthLeft, - bodyBorderRowWidthRight: bodyBorderRowWidthRight, - bodyBorderRowWidthBottom: bodyBorderRowWidthBottom, + bodyBorderRowWidthTop, + bodyBorderRowWidthLeft, + bodyBorderRowWidthRight, + bodyBorderRowWidthBottom, } } onChange={handleMultipleAttributesChange} @@ -319,16 +320,17 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, label={__('Border cell color', 'flexible-invoices-core')} value={bodyBorderCellColor} enableAlpha={false} + returnFormat={'hex'} onChange={(value) => setAttributes({bodyBorderCellColor: value})} /> <QuatroInput label={__("Border cell width", 'flexible-invoices-core')} values={ { - bodyBorderCellWidthTop: bodyBorderCellWidthTop, - bodyBorderCellWidthLeft: bodyBorderCellWidthLeft, - bodyBorderCellWidthRight: bodyBorderCellWidthRight, - bodyBorderCellWidthBottom: bodyBorderCellWidthBottom, + bodyBorderCellWidthTop, + bodyBorderCellWidthLeft, + bodyBorderCellWidthRight, + bodyBorderCellWidthBottom, } } onChange={handleMultipleAttributesChange} -- GitLab