Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
WordPress UI Components
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
WordPress UI Components
Commits
e6ecb8d7
Commit
e6ecb8d7
authored
3 months ago
by
Eryk Mika
Browse files
Options
Downloads
Patches
Plain Diff
feature: text color selector for odd rows
parent
1c6aed01
No related branches found
No related tags found
1 merge request
!1
Main
Pipeline
#479210
failed with stages
Stage: prepare-vendor
Stage: tests
Stage: deploy
in 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/FlexibleTable/FlexibleTable.jsx
+18
-5
18 additions, 5 deletions
src/FlexibleTable/FlexibleTable.jsx
with
18 additions
and
5 deletions
src/FlexibleTable/FlexibleTable.jsx
+
18
−
5
View file @
e6ecb8d7
...
...
@@ -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
C
olor
'
,
'
flexible-invoices-core
'
)
}
label
=
{
__
(
'
Text
c
olor
'
,
'
flexible-invoices-core
'
)
}
value
=
{
bodyTextColor
}
enableAlpha
=
{
false
}
onChange
=
{
(
value
)
=>
setAttributes
({
bodyTextColor
:
value
})
}
/>
<
ColorSelector
label
=
{
__
(
'
Background
C
olor
'
,
'
flexible-invoices-core
'
)
}
label
=
{
__
(
'
Background
c
olor
'
,
'
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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment