Update Theme Context and CSS for Enhanced Placeholder Color and State Handling
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good

- Added a new CSS variable for text placeholder color, improving consistency across themes.
- Updated the ThemeContext to set the new placeholder color based on dark mode settings.
- Enhanced the state handling in Utils.js to include 'overdue' status, improving clarity in state representation.
This commit is contained in:
Tom Butcher 2026-09-06 22:57:53 +01:00
parent 749ddf0c31
commit ae1194efb9
3 changed files with 9 additions and 1 deletions

View File

@ -2971,7 +2971,7 @@ body.objectKanbanColumnResizing * {
bottom: 0;
display: flex;
align-items: center;
color: var(--ant-color-text-placeholder, rgba(0, 0, 0, 0.25));
color: var(--color-text-placeholder, rgba(0, 0, 0, 0.25));
pointer-events: none;
white-space: nowrap;
overflow: hidden;

View File

@ -200,6 +200,10 @@ export const ThemeProvider = ({ children }) => {
'--color-table-row-border',
isDarkMode ? '#303030' : '#f0f0f0'
)
root.style.setProperty(
'--color-text-placeholder',
isDarkMode ? '#4F4F4F' : '#BFBFBF'
)
}, [isDarkMode, primaryColorOverride])
const themeConfig = {

View File

@ -285,6 +285,10 @@ export function getStateTagInfo(state) {
status = 'success'
text = 'Paid'
break
case 'overdue':
status = 'error'
text = 'Overdue'
break
default:
status = 'default'
text = state || 'Unknown'