How to use the prop-types.PropTypes.object function in prop-types

To help you get started, we’ve selected a few prop-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github smollweide / react-speed-dial / src / components / bubble-list-item / bubble-list-item.prop-types.js View on Github external
import { PropTypes } from 'prop-types';

export default {
	alignment: PropTypes.string,
	className: PropTypes.string,
	direction: PropTypes.string,
	href: PropTypes.string,
	isInTransition: PropTypes.bool,
	isOpen: PropTypes.bool,
	leftAvatar: PropTypes.object,
	positionV: PropTypes.string,
	primaryText: PropTypes.string,
	rightAvatar: PropTypes.object,
	style: PropTypes.object,
	styleText: PropTypes.object,
	tabIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
	onBlur: PropTypes.func,
	onClick: PropTypes.func,
	onFocus: PropTypes.func,
	onKeyboardFocus: PropTypes.func,
	onKeyDown: PropTypes.func,
	onKeyUp: PropTypes.func,
	onMouseDown: PropTypes.func,
	onMouseEnter: PropTypes.func,
	onMouseLeave: PropTypes.func,
	onMouseUp: PropTypes.func,
};
github hummingbird-me / kitsu-mobile / src / screens / Library / LibrarySearch / component.js View on Github external
current: 'Reading',
    planned: 'Want to Read',
    completed: 'Completed',
    on_hold: 'On Hold',
    dropped: 'Dropped',
  },
};

export class LibrarySearchComponent extends PureComponent {
  static navigationOptions = () => ({
    header: null,
  });

  static propTypes = {
    currentUser: PropTypes.object.isRequired,
    profile: PropTypes.object.isRequired,
    navigation: PropTypes.object.isRequired,
    updateUserLibraryEntry: PropTypes.func.isRequired,
    deleteUserLibraryEntry: PropTypes.func.isRequired,
  };

  state = {
    loadingAnime: false,
    loadingManga: false,
    anime: [],
    manga: [],
    isSwiping: false,
    searchTerm: '',
  }

  componentDidMount() {
    this.unsubscribeUpdate = KitsuLibrary.subscribe(KitsuLibraryEvents.LIBRARY_ENTRY_UPDATE, this.kitsuLibraryEntryUpdated);
github OasisDEX / oasis-react / src / containers / SetTokenAllowanceTrust.jsx View on Github external
TX_STATUS_REJECTED
} from "../store/reducers/transactions";
import network from "../store/selectors/network";
import FlexBox from "../components/FlexBox";
import {
  TOKEN_ALLOWANCE_TRUST_STATUS_DISABLED,
  TOKEN_ALLOWANCE_TRUST_STATUS_ENABLED,
  TOKEN_ALLOWANCE_TRUST_STATUS_ENABLED_MIN,
  TOKEN_ALLOWANCE_TRUST_STATUS_LOADING
} from "../constants";

import OasisIcon from "../components/OasisIcon";
import OasisYourTransactionFailed from "../components/OasisYourTransactionFailed";

const propTypes = PropTypes && {
  actions: PropTypes.object.isRequired,
  subjectTrustStatus: PropTypes.bool,
  tokenName: PropTypes.string.isRequired,
  allowanceSubjectAddress: PropTypes.string.isRequired,
  isToggleEnabled: PropTypes.bool,
  onTransactionPending: PropTypes.func,
  onTransactionCompleted: PropTypes.func,
  onTransactionRejected: PropTypes.func,
  onCancelCleanup: PropTypes.func
};

export class SetTokenAllowanceTrustWrapper extends PureComponent {
  constructor(props) {
    super(props);
    this.state = {
      isToggleAllowanceTxPending: false
    };
github dondido / webrtc-video-room / src / containers / CommunicationContainer.js View on Github external
handleHangup={this.handleHangup}
        handleInput={this.handleInput}
        handleInvitation={this.handleInvitation} />
    );
  }
}
const mapStateToProps = store => ({video: store.video, audio: store.audio});
const mapDispatchToProps = dispatch => (
  {
    setVideo: boo => store.dispatch({type: 'SET_VIDEO', video: boo}),
    setAudio: boo => store.dispatch({type: 'SET_AUDIO', audio: boo})
  }
);

CommunicationContainer.propTypes = {
  socket: PropTypes.object.isRequired,
  getUserMedia: PropTypes.object.isRequired,
  audio: PropTypes.bool.isRequired,
  video: PropTypes.bool.isRequired,
  setVideo: PropTypes.func.isRequired,
  setAudio: PropTypes.func.isRequired,
  media: PropTypes.instanceOf(MediaContainer)
};
export default connect(mapStateToProps, mapDispatchToProps)(CommunicationContainer);
github dnnsoftware / Dnn.Platform / DNN Platform / Modules / ResourceManager / ResourceManager.Web / app / containers / AddFolderPanelContainer.jsx View on Github external
<div></div>
            
        ) : null;
    }
}

AddFolderPanelContainer.propTypes = {
    expanded: PropTypes.bool,
    hasPermission: PropTypes.bool,
    hidePanel: PropTypes.func,
    loadFolderMappings: PropTypes.func,
    folderTypes: PropTypes.array,
    validationErrors: PropTypes.object,
    formData: PropTypes.object,
    folderPanelState: PropTypes.object,
    changeName: PropTypes.func,
    changeFolderType: PropTypes.func,
    addFolder: PropTypes.func,
    setValidationErrors: PropTypes.func
};

function mapStateToProps(state) {
    const folderPanelState = state.folderPanel;
    const addFolderPanelState = state.addFolderPanel;

    return {
        expanded: addFolderPanelState.expanded,
        hasPermission: folderPanelState.hasAddFoldersPermission,
        folderTypes: addFolderPanelState.folderMappings,
        formData: addFolderPanelState.formData || {},
github hummingbird-me / kitsu-mobile / src / components / MediaCard / component.js View on Github external
{loading &amp;&amp;
          
        }

      
    
  );
};

MediaCard.propTypes = {
  caption: PropTypes.string,
  cardDimensions: PropTypes.object.isRequired,
  cardStyle: ViewPropTypes.style,
  mediaData: PropTypes.object.isRequired,
  componentId: PropTypes.any,
  progress: PropTypes.number,
  ratingTwenty: PropTypes.number,
  ratingSystem: PropTypes.string,
  style: ViewPropTypes.style,
  loading: PropTypes.bool,
};

MediaCard.defaultProps = {
  caption: '',
  cardStyle: null,
  progress: 0,
  ratingTwenty: undefined,
  ratingSystem: 'simple',
  style: null,
  loading: false,
github linode / manager / components / tables / cells / DropdownCell.js View on Github external
import TableCell from './TableCell';


export default function DropdownCell(props) {
  const { column, record } = props;

  return (
    
      
    
  );
}

DropdownCell.propTypes = {
  column: PropTypes.object.isRequired,
  record: PropTypes.object.isRequired,
};
github cernanalysispreservation / analysispreservation.cern.ch / ui / src / components / cms / components / SchemaWizard / PropertyEditor / PropKeyView.js View on Github external
{
              this.setState({ editEnabled: true });
            }}
          /&gt;
        
      
    );
  }
}

PropKeyView.propTypes = {
  cancel: PropTypes.func,
  onFormSchemaChange: PropTypes.func,
  field: PropTypes.object,
  path: PropTypes.array,
  propKey: PropTypes.array
};

export default PropKeyView;
github cernanalysispreservation / analysispreservation.cern.ch / ui / src / components / cms / components / SchemaWizard / PropertyEditor / customizeField.js View on Github external
);
  }
}

CustomizeField.propTypes = {
  field: PropTypes.object,
  cancel: PropTypes.func,
  schema: PropTypes.object,
  uiSchema: PropTypes.object,
  onSchemaChange: PropTypes.func,
  onUiSchemaChange: PropTypes.func,
  path: PropTypes.array
};

export default CustomizeField;
github climatescope / climatescope.org / app / assets / scripts / components / loading-skeleton.js View on Github external
const k = c('lsk__item', {
    [`lsk__item--${type}`]: !!type,
    [`lsk__item--${size}`]: !!size,
    [`lsk__item--${theme}`]: !!theme
  })
  style = {
    ...style,
    width: `${width * 100}%`,
    display: inline ? 'inline-block' : 'block'
  }
  return <span style="{style}">
}

if (environment !== 'production') {
  LoadingSkeleton.propTypes = {
    style: T.object,
    type: T.string,
    theme: T.string,
    size: T.string,
    width: T.number,
    inline: T.bool
  }
}
</span>