From 9fbfe627a17c81263aa8f1ae1d650f4759c97d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 15 Nov 2024 14:40:15 +0100 Subject: [PATCH] pl-fe: fixes or sth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/normalizers/pl-fe/pl-fe-config.ts | 10 +++++++++- packages/pl-fe/src/utils/tailwind.ts | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/normalizers/pl-fe/pl-fe-config.ts b/packages/pl-fe/src/normalizers/pl-fe/pl-fe-config.ts index 52048af56..022685923 100644 --- a/packages/pl-fe/src/normalizers/pl-fe/pl-fe-config.ts +++ b/packages/pl-fe/src/normalizers/pl-fe/pl-fe-config.ts @@ -143,7 +143,15 @@ const plFeConfigSchema = v.pipe(coerceObject({ ...config, brandColor, accentColor, - colors: normalizedColors, + colors: { + // @ts-ignore + 'gradient-start': normalizedColors.primary?.['500'], + // @ts-ignore + 'gradient-end': normalizedColors.accent?.['500'], + // @ts-ignore + 'accent-blue': normalizedColors.primary?.['600'], + ...normalizedColors, + } as typeof normalizedColors, }; })); diff --git a/packages/pl-fe/src/utils/tailwind.ts b/packages/pl-fe/src/utils/tailwind.ts index 3d6e8dfba..f2306e98e 100644 --- a/packages/pl-fe/src/utils/tailwind.ts +++ b/packages/pl-fe/src/utils/tailwind.ts @@ -52,7 +52,7 @@ const toTailwind = (config: { const colors: PlFeColors = config.colors; const legacyColors = fromLegacyColors(config); - return Object.fromEntries(Object.entries(legacyColors).map(([key, value]) => [key, typeof value === 'string' ? colors[key] || value : { ...value, ...config.colors[key] }])); + return Object.fromEntries(Object.entries(legacyColors).map(([key, value]) => [key, typeof value === 'string' ? colors[key] || value : { ...value, ...colors[key] }])); }; export {