ButtonWidget.tsx (line 102) and ApplicationHeader.tsx (line 95) each define their own inline getContrastColor function with identical WCAG luminance logic.
Now that getContrastColor is exported from src/utils/colorResolver.ts (added in #155), those two components can import the shared version instead.
Scope: Replace the inline functions in ButtonWidget and ApplicationHeader with imports from colorResolver.ts. No behavior change — just removing duplication.
Files:
src/components/Button/ButtonWidget.tsx
src/components/ApplicationHeader/ApplicationHeader.tsx
src/utils/colorResolver.ts (already done)
ButtonWidget.tsx (line 102) and ApplicationHeader.tsx (line 95) each define their own inline
getContrastColorfunction with identical WCAG luminance logic.Now that
getContrastColoris exported fromsrc/utils/colorResolver.ts(added in #155), those two components can import the shared version instead.Scope: Replace the inline functions in ButtonWidget and ApplicationHeader with imports from
colorResolver.ts. No behavior change — just removing duplication.Files:
src/components/Button/ButtonWidget.tsxsrc/components/ApplicationHeader/ApplicationHeader.tsxsrc/utils/colorResolver.ts(already done)