From d87a9a3a9f0587ca61e6a4104cee89cfd02bb017 Mon Sep 17 00:00:00 2001 From: Patricia Romaniuc Date: Fri, 6 Mar 2026 11:30:17 +0200 Subject: [PATCH] fix(categorize): category box border color fix PD-5546 --- packages/categorize/src/categorize/choices.jsx | 4 +++- packages/categorize/src/categorize/droppable-placeholder.jsx | 4 ++-- packages/categorize/src/categorize/index.jsx | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/categorize/src/categorize/choices.jsx b/packages/categorize/src/categorize/choices.jsx index dbb3b47325..dc739f56fa 100644 --- a/packages/categorize/src/categorize/choices.jsx +++ b/packages/categorize/src/categorize/choices.jsx @@ -29,6 +29,7 @@ export class Choices extends React.Component { choicePosition: PropTypes.string, onDropChoice: PropTypes.func, onRemoveChoice: PropTypes.func, + correct: PropTypes.boolean, }; static defaultProps = { @@ -39,7 +40,7 @@ export class Choices extends React.Component { }; render() { - const { choices = [], model, disabled, onDropChoice, onRemoveChoice, choicePosition } = this.props; + const { choices = [], model, disabled, onDropChoice, onRemoveChoice, choicePosition, correct } = this.props; let style = { textAlign: 'center', @@ -58,6 +59,7 @@ export class Choices extends React.Component { disabled={disabled} style={{ background: 'none' }} choiceBoard={true} + correct={correct} > {model.choicesLabel && model.choicesLabel !== '' && ( diff --git a/packages/categorize/src/categorize/droppable-placeholder.jsx b/packages/categorize/src/categorize/droppable-placeholder.jsx index 3e8bbb1d7a..8fda2141d4 100644 --- a/packages/categorize/src/categorize/droppable-placeholder.jsx +++ b/packages/categorize/src/categorize/droppable-placeholder.jsx @@ -39,10 +39,10 @@ const DroppablePlaceholder = ({ alignContent: 'flex-start', width: '100%', height: '100%', - ...(correct === false && { + ...(correct === false && !choiceBoard && { border: `solid 2px ${color.incorrect()}`, }), - ...(correct === true && { + ...(correct === true && !choiceBoard && { border: `solid 2px ${color.correct()}`, }), }; diff --git a/packages/categorize/src/categorize/index.jsx b/packages/categorize/src/categorize/index.jsx index 910a34076d..e9ba78ff60 100644 --- a/packages/categorize/src/categorize/index.jsx +++ b/packages/categorize/src/categorize/index.jsx @@ -286,6 +286,7 @@ export class Categorize extends React.Component { choicePosition={choicePosition} onDropChoice={this.dropChoice} onRemoveChoice={this.removeChoice} + correct={correct} /> {displayNote && (