Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/categorize/src/categorize/choices.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class Choices extends React.Component {
choicePosition: PropTypes.string,
onDropChoice: PropTypes.func,
onRemoveChoice: PropTypes.func,
correct: PropTypes.boolean,
};

static defaultProps = {
Expand All @@ -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',
Expand All @@ -58,6 +59,7 @@ export class Choices extends React.Component {
disabled={disabled}
style={{ background: 'none' }}
choiceBoard={true}
correct={correct}
>
{model.choicesLabel && model.choicesLabel !== '' && (
<LabelHolder dangerouslySetInnerHTML={{ __html: model.choicesLabel }} />
Expand Down
4 changes: 2 additions & 2 deletions packages/categorize/src/categorize/droppable-placeholder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { PlaceHolder } from '@pie-lib/drag';
import { color } from '@pie-lib/render-ui';

const log = debug('@pie-ui:categorize:droppable-placeholder');

Check warning on line 9 in packages/categorize/src/categorize/droppable-placeholder.jsx

View workflow job for this annotation

GitHub Actions / test

'log' is assigned a value but never used

const DroppablePlaceholder = ({
children,
Expand Down Expand Up @@ -39,10 +39,10 @@
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()}`,
}),
};
Expand Down
1 change: 1 addition & 0 deletions packages/categorize/src/categorize/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

render() {
return <div ref={this.containerRef}>{this.props.children}</div>;

Check warning on line 30 in packages/categorize/src/categorize/index.jsx

View workflow job for this annotation

GitHub Actions / test

'children' is missing in props validation
}
}

Expand Down Expand Up @@ -286,6 +286,7 @@
choicePosition={choicePosition}
onDropChoice={this.dropChoice}
onRemoveChoice={this.removeChoice}
correct={correct}
/>
</StyledCategorize>
{displayNote && (
Expand Down Expand Up @@ -329,7 +330,7 @@

onDragStart = (event) => {
const { active } = event;
const { pauseMathObserver } = this.props;

Check warning on line 333 in packages/categorize/src/categorize/index.jsx

View workflow job for this annotation

GitHub Actions / test

'pauseMathObserver' is missing in props validation

if (pauseMathObserver) {
pauseMathObserver();
Expand All @@ -345,7 +346,7 @@

onDragEnd = (event) => {
const { active, over } = event;
const { resumeMathObserver } = this.props;

Check warning on line 349 in packages/categorize/src/categorize/index.jsx

View workflow job for this annotation

GitHub Actions / test

'resumeMathObserver' is missing in props validation

// Check if drop is valid
const draggedItem = active?.data?.current;
Expand Down
Loading