Skip to content
Snippets Groups Projects
Commit a36af11c authored by Ben Wheeler's avatar Ben Wheeler
Browse files

added proptypes for asset

parent 51f32c7b
No related branches found
No related tags found
No related merge requests found
......@@ -82,11 +82,9 @@ const TargetPane = ({
{stage.id && <StageSelector
asset={
stage.costume &&
// TODO: set correct prop type for this
stage.costume.asset // eslint-disable-line react/prop-types
stage.costume.asset
}
// TODO: set correct prop type for this
backdropCount={stage.costumeCount} // eslint-disable-line react/prop-types
backdropCount={stage.costumeCount}
id={stage.id}
selected={stage.id === editingTarget}
onSelect={onSelectSprite}
......@@ -106,6 +104,8 @@ const TargetPane = ({
const spriteShape = PropTypes.shape({
costume: PropTypes.shape({
// asset is defined in scratch-storage's Asset.js
asset: PropTypes.object, // eslint-disable-line react/forbid-prop-types
url: PropTypes.string,
name: PropTypes.string.isRequired,
// The following are optional because costumes uploaded from disk
......@@ -114,6 +114,7 @@ const spriteShape = PropTypes.shape({
rotationCenterX: PropTypes.number,
rotationCenterY: PropTypes.number
}),
costumeCount: PropTypes.number,
direction: PropTypes.number,
id: PropTypes.string,
name: PropTypes.string,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment