How to use the prop-types.any 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 atulmy / hire-smart / code / mobile / web / src / modules / common / Header / index.js View on Github external
? 
              : { title }
          }
        

        { rightIcon }
      
    
  
)

// Component Properties
Header.propTypes = {
  title: PropTypes.string,
  leftIcon: PropTypes.any,
  rightIcon: PropTypes.any,
  classes: PropTypes.object.isRequired
}

export default withStyles(styles)(Header)
github cuke-ui / cuke-ui / components / popconfirm / index.js View on Github external
trigger: triggerTypes.click,
    onVisibleChange: () => {},
    okButtonProps: {},
    cancelButtonProps: {},
    onOk: () => {},
    onCancel: () => {},
    disabled: false,
    hiddenArrow: false, // 隐藏三角箭头
    icon: 
  };

  static propTypes = {
    prefixCls: PropTypes.string.isRequired,
    onVisibleChange: PropTypes.func,
    title: PropTypes.any,
    okText: PropTypes.any,
    cancelText: PropTypes.any,
    trigger: PropTypes.oneOf(Object.values(triggerTypes)),
    position: PropTypes.oneOf(["top", "right", "left", "bottom"]),
    theme: PropTypes.oneOf(["light", "dark"]),
    okProps: PropTypes.object,
    cancelProps: PropTypes.object,
    icon: PropTypes.any,
    hiddenArrow: PropTypes.bool
  };

  constructor(props) {
    super(props);
  }

  _onVisibleChange = visible => {
    this.setState({ visible }, () => {
github JasonFritsche / BreweryFinder / src / components / Brewery.js View on Github external
<h6>{street}</h6>
          <h6>
            {city}, {state}
          </h6>
          <div>
            <div>{displayWebsiteUrl(websiteUrl)}</div>
            <div>{displayLocation([street, city, state])}</div>
          </div>
        
      
    
  )
}

Brewery.propTypes = {
  brewery: PropTypes.objectOf(PropTypes.any).isRequired
}

export default Brewery
github xtrinch / react-touch-screen-keyboard / src / icons / LanguageIcon.js View on Github external
import React from 'react';
import PropTypes from 'prop-types';

const LanguageIcon = ({ viewBox = '0 0 24 24', width = 24, height = 24, fill }) =&gt;
  <svg viewBox="">
    <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"></path>
  </svg>
;

LanguageIcon.propTypes = {
  viewBox: PropTypes.string,
  width: PropTypes.number,
  height: PropTypes.number,
  fill: PropTypes.any,
};

export default LanguageIcon;
github Automattic / jetpack / _inc / client / components / form / input-checkbox-multiple.jsx View on Github external
* Internal Dependencies
 */
import Label from './label';
import getUniqueId from './counter';
import FormInputValidation from '../form-input-validation';
import requiredFieldErrorFormatter from './required-error-label';

export default createReactClass( {
	displayName: 'MultiCheckboxInput',

	mixins: [ Formsy.Mixin ],

	propTypes: {
		name: PropTypes.string.isRequired,
		description: PropTypes.string,
		className: PropTypes.any,
		choices: PropTypes.any,
		defaultValue: PropTypes.array,
		validations: PropTypes.string,
		onChange: PropTypes.func,
		showSelectAll: PropTypes.bool,
		selectAllLabel: PropTypes.string,
	},

	getDefaultProps: function() {
		return {
			showSelectAll: false,
			defaultValue: [],
		};
	},

	getInitialState: function() {
github lifechurch / melos / nodejs / app / features / Bible / components / versionPicker / VersionPicker.js View on Github external
)
	}
}


/**
 *	@languages: 					array of languages
 *	@languageMap: 				object relating language_tag to array index
 *	@version: 						currently rendered version object
 *	@versions:    				list of versions for version.selectedLanguage
 *	@selectedChapter: 		rendered chapter
 */
VersionPicker.propTypes = {
	alert: PropTypes.any,
	languages: PropTypes.array,
	languageMap: PropTypes.object,
	version: PropTypes.object,
	recentVersions: PropTypes.object,
	selectedChapter: PropTypes.string,
	getVersions: PropTypes.func,
	dispatch: PropTypes.func,
	cancelDropDown: PropTypes.bool,
	intl: PropTypes.object,
	onClick: PropTypes.func,
	extraClassNames: PropTypes.string,
	linkBuilder: PropTypes.func,
	allVersions: PropTypes.array,
	versionsById: PropTypes.object,
	selectedLanguage: PropTypes.string,
}
github OlegChulakovStudio / chramework / src / components / Block / Block.jsx View on Github external
level: 2,
  background: false,
  noMargin: false,
  outside: false,
  style: {}
};

Block.propTypes = {
  children: PropTypes.node,
  mod: PropTypes.any,
  title: PropTypes.any,
  background: PropTypes.bool,
  noMargin: PropTypes.bool,
  className: PropTypes.string,
  level: PropTypes.number,
  subtitle: PropTypes.any,
  headerLevel: PropTypes.number,
  outside: PropTypes.bool,
  scrollId: PropTypes.string,
  style: PropTypes.object,
  bgColor: PropTypes.string
};

export default Block;
github StamusNetworks / scirius / hunt / src / containers / HistoryPage / HistoryPage.js View on Github external
itemsEnd={Math.min((this.props.rules_list.pagination.page * this.props.rules_list.pagination.perPage) - 1, this.state.count - 1)}
                        onFirstPage={this.onFirstPage}
                        onNextPage={this.onNextPage}
                        onPreviousPage={this.onPrevPage}
                        onLastPage={this.onLastPage}
                    /&gt;
                
            
        );
    }
}

HistoryPage.propTypes = {
    rules_list: PropTypes.any,
    filters: PropTypes.any,
    switchPage: PropTypes.any,
    from_date: PropTypes.any,
    updateListState: PropTypes.any,
    getActionTypes: PropTypes.func,
    actionTypesList: PropTypes.array,
    page: PropTypes.any
};
github Kalcode / gatsby-boilerplate / src / components / Form / Checkboxes / CheckboxesView.js View on Github external
<legend>{children}</legend>
        {checkboxes.map((item) =&gt; (
          [
            <input required="{item.required}" value="{item.value}" checked="{!!getValue(item.id)}" name="{item.id}" id="{item.id}" type="checkbox">,
            <label>{item.label || item.value}</label>,
          ]
        ))}
      
    
  )
}

CheckboxesView.propTypes = {
  children: PropTypes.any,
  checkboxes: PropTypes.array.isRequired,
  error: PropTypes.any,
  inputProps: PropTypes.object.isRequired,
  getValue: PropTypes.func.isRequired,
}
github marmelab / react-admin / packages / ra-ui-materialui / src / list / DatagridBody.js View on Github external
)}
            
        ),
        [version, isLoading, data, selectedIds, JSON.stringify(ids)]
    );

DatagridBody.propTypes = {
    basePath: PropTypes.string,
    classes: PropTypes.object,
    className: PropTypes.string,
    children: PropTypes.node,
    data: PropTypes.object.isRequired,
    expand: PropTypes.element,
    hasBulkActions: PropTypes.bool.isRequired,
    hover: PropTypes.bool,
    ids: PropTypes.arrayOf(PropTypes.any).isRequired,
    isLoading: PropTypes.bool,
    onToggleItem: PropTypes.func,
    resource: PropTypes.string,
    row: PropTypes.element,
    rowClick: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
    rowStyle: PropTypes.func,
    selectedIds: PropTypes.arrayOf(PropTypes.any),
    styles: PropTypes.object,
    version: PropTypes.number,
};

DatagridBody.defaultProps = {
    data: {},
    hasBulkActions: false,
    ids: [],
    row: ,