From 646db8a6390ed5365cf162fc3c5a8f497a44e572 Mon Sep 17 00:00:00 2001 From: andrewHEguardian <114918544+andrewHEguardian@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:31:09 +0000 Subject: [PATCH] add new logo colour field (as optional) --- app/models/BannerDesign.scala | 1 + .../bannerDesigns/BasicColoursEditor.tsx | 9 +++++++++ public/src/models/bannerDesign.ts | 1 + 3 files changed, 11 insertions(+) diff --git a/app/models/BannerDesign.scala b/app/models/BannerDesign.scala index e8d3bb93c..1c83bd6a8 100644 --- a/app/models/BannerDesign.scala +++ b/app/models/BannerDesign.scala @@ -72,6 +72,7 @@ case class BannerDesignBasicColours( bodyText: HexColour, headerText: HexColour, articleCountText: HexColour, + logo: Option[HexColour] ) case class BannerDesignHighlightedTextColours( diff --git a/public/src/components/channelManagement/bannerDesigns/BasicColoursEditor.tsx b/public/src/components/channelManagement/bannerDesigns/BasicColoursEditor.tsx index 84f134eae..2f989a573 100644 --- a/public/src/components/channelManagement/bannerDesigns/BasicColoursEditor.tsx +++ b/public/src/components/channelManagement/bannerDesigns/BasicColoursEditor.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { BasicColours } from '../../../models/bannerDesign'; import { ColourInput } from './ColourInput'; import { makeStyles, Theme } from '@material-ui/core/styles'; +import { stringToHexColour } from '../../../utils/bannerDesigns'; const useStyles = makeStyles(({ spacing }: Theme) => ({ container: { @@ -62,6 +63,14 @@ export const BasicColoursEditor: React.FC = ({ onChange={colour => onChange({ ...basicColours, articleCountText: colour })} onValidationChange={onValidationChange} /> + onChange({ ...basicColours, logo: colour })} + onValidationChange={onValidationChange} + /> ); }; diff --git a/public/src/models/bannerDesign.ts b/public/src/models/bannerDesign.ts index 828545d8d..dbcbc9fe8 100644 --- a/public/src/models/bannerDesign.ts +++ b/public/src/models/bannerDesign.ts @@ -12,6 +12,7 @@ export interface BasicColours { bodyText: HexColour; headerText: HexColour; articleCountText: HexColour; + logo?: HexColour; } export interface HighlightedTextColours {