@instructure/quiz-interactions
Version:
A React UI component Library for quiz interaction types.
62 lines • 1.08 kB
JavaScript
import imageUrl from '../exampleImage.png';
export default {
propValues: {
scoringData: [{
value: {
type: 'square',
coordinates: [{
x: 0.3,
y: 0.3
}, {
x: 0.7,
y: 0.7
}]
}
}, {
value: {
type: 'oval',
coordinates: [{
x: 0.3,
y: 0.3
}, {
x: 0.7,
y: 0.7
}]
}
}, {
value: {
type: 'polygon',
coordinates: [{
x: 0.3,
y: 0.3
}, {
x: 0.7,
y: 0.2
}, {
x: 0.8,
y: 0.4
}, {
x: 0.5,
y: 0.5
}, {
x: 0.7,
y: 0.7
}, {
x: 0.2,
y: 0.6
}, {
x: 0.3,
y: 0.3
}]
}
}]
},
getComponentProps: function getComponentProps(props) {
return {
itemBody: "Hotspot Show (".concat(props.scoringData.value.type, ")"),
interactionData: {
imageUrl: imageUrl
}
};
}
};