Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
customNode: PropTypes.node,
/** Function that takes the node info and returns the components to add at the bottom of the tooltip */
// tooltipChildren: PropTypes.func,
/** Configuration */
config: PropTypes.shape({
/** Configuration for the tooltip */
tooltip: PropTypes.object,
/** Configuration for each node */
node: PropTypes.object,
/** Configuration for the aspect of the responsive container */
aspect: PropTypes.number
}),
/** Set margin of sankey component, used to calculate a position of all child elements inside sankey charts */
margin: PropTypes.shape({
top: PropTypes.number,
right: PropTypes.number,
bottom: PropTypes.number,
left: PropTypes.number
}),
handleMouseOver: PropTypes.func,
handleMouseLeave: PropTypes.func,
handleOnClick: PropTypes.func,
handleOutsideClick: PropTypes.func
};
SankeyChart.defaultProps = {
width: 960,
height: 500,
data: {},
nodeWidth: 140,
nodePadding: 10,
containerWidth: 800,
<div>
<div style="{{">
</div>
<div style="{style}">
);
}
TimeRangeBar.propTypes = {
ganttBarWidth: PropTypes.number,
isRunning: PropTypes.bool,
timerange: PropTypes.shape({
widthPx: PropTypes.number,
label: PropTypes.string,
fromPx: PropTypes.number,
}),
};
</div></div>
onClick={(e, index) => {
e.preventDefault();
window.history.pushState(null, '', generateHref(index));
changeActiveContent(index)();
}}
linksPrimaryColor={linksPrimaryColor}
linksSecondaryColor={linksSecondaryColor}
/>
);
}
AboutContentNavigation.propTypes = {
classes: PropTypes.shape({}).isRequired,
title: PropTypes.string.isRequired,
current: PropTypes.number.isRequired,
contentHeadings: PropTypes.arrayOf(PropTypes.shape({}).isRequired).isRequired,
changeActiveContent: PropTypes.func.isRequired,
linksPrimaryColor: PropTypes.string,
linksSecondaryColor: PropTypes.string
};
AboutContentNavigation.defaultProps = {
linksPrimaryColor: 'primary',
linksSecondaryColor: 'textPrimary'
};
export default withStyles(styles)(AboutContentNavigation);
import { PropTypes } from 'prop-types'
export default {
label: PropTypes.string.isRequired,
viewport: PropTypes.shape({
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
}).isRequired,
portrait: PropTypes.bool,
}
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
export default class Photos extends Component {
static defaultProps = {
photos: [],
};
static propTypes = {
requestPhotos: PropTypes.func.isRequired,
photos: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.number.isRequired,
thumbnailUrl: PropTypes.string.isRequired,
}),
),
};
componentWillMount() {
this.props.requestPhotos();
}
render() {
return (
<div>
<h2>Album</h2>
{this.props.photos
? this.props.photos.map(({ id, thumbnailUrl }) => <img alt="{thumbnailUrl}" src="{thumbnailUrl}">)</div>
fullyChecked={this.fullyChecked}
individuallyChecked={this.individuallyChecked}
unchecked={this.unchecked}
updateTree={this.updateTree.bind(this)}
reAlignTree={this.reAlignTree.bind(this)}
findParent={this.findParent.bind(this)}
/>
);
}
}
TreeControlInteractor.propTypes = {
selectedColor: PropTypes.string.isRequired,
characterLimit: PropTypes.number.isRequired,
PortalTabsParameters: PropTypes.object.isRequired,
OnSelect: PropTypes.func.isRequired,
PortalTabParameters: PropTypes.object.isRequired,
getInitialPortalTabs: PropTypes.func.isRequired,
getDescendantPortalTabs: PropTypes.func.isRequired
};
JourneyBar.propTypes = {
badge: PropTypes.shape({
badgeSVG: PropTypes.string,
title: PropTypes.string,
id: PropTypes.string,
shown: PropTypes.bool,
activeTaskIndexWhenEarned: PropTypes.oneOfType([null, PropTypes.number])
}),
activeChapterIndex: PropTypes.number,
activeChapterId: PropTypes.string,
activeTaskPhase: PropTypes.string,
activeChapterDuration: PropTypes.number,
allTaskPhaseData: PropTypes.objectOf(
PropTypes.shape({
time: PropTypes.number
})
),
activeTaskIndex: PropTypes.number
};
const mapStateToProps = state => ({
activeChapterIndex: getActiveChapterIndex(state),
activeChapterId: getActiveChapterId(state),
activeTaskPhase: getTaskPhase(state),
activeChapterDuration: getActiveChapterDuration(state),
allTaskPhaseData: getAllTaskPhaseData(state),
activeTaskIndex: getActiveTaskIndex(state)
});
export default connect(mapStateToProps)(JourneyBar);
);
};
TaskScreenContainer.propTypes = {
startChapterAndPhaseTimers: PropTypes.func,
finishSolveTaskEarly: PropTypes.func,
taskPhase: PropTypes.oneOf([...Object.values(taskPhaseKeys)]),
playerKit: PropTypes.shape({}),
activeTask: PropTypes.shape({
id: PropTypes.string,
time: PropTypes.number,
audioInstruction: PropTypes.string,
audioQuestion: PropTypes.string,
requiredItem: PropTypes.string,
numberItemsToSolve: PropTypes.number,
peopleSavedRange: PropTypes.arrayOf(PropTypes.number),
petsSaved: PropTypes.number,
imageSVG: PropTypes.string,
imageAlt: PropTypes.string,
sceneSVG: PropTypes.string,
sceneAlt: PropTypes.string,
clue: PropTypes.string,
saveYourselfClue: PropTypes.string,
completed: PropTypes.bool,
completedResults: PropTypes.shape({
people: PropTypes.number,
pets: PropTypes.number
})
}),
restartGame: PropTypes.func,
endingChapter: PropTypes.bool,
endChapter: PropTypes.func,
backgroundColor: 'transparent',
},
});
Ball.defaultProps = {
onStart: () => {},
x: 0,
y: 0,
radius: 48,
rotate: 0,
scale: 1,
};
Ball.propTypes = {
onStart: PropTypes.func,
x: PropTypes.number,
y: PropTypes.number,
radius: PropTypes.number,
rotate: PropTypes.number,
scale: PropTypes.number,
};
export default Ball;
import React from "react";
import {PropTypes} from 'prop-types';
import Remarkable from 'remarkable';
let md = new Remarkable();
class Comment extends React.Component {
static propTypes = {
commentId: PropTypes.number.isRequired,
author: PropTypes.string,
children: PropTypes.any,
onCommentDelete: PropTypes.func
};
rawMarkup = () => {
let rawMarkup = '';
if (this.props.children) {
rawMarkup = md.render(this.props.children.toString());
}
return { __html: rawMarkup };
};
handleDelete = () => {
let commentId = this.props.commentId;
if (!commentId) {