prop-types#array JavaScript Examples
The following examples show how to use
prop-types#array.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SingleComponentStacked.js From wix-style-react with MIT License | 6 votes |
SingleComponentStacked.propTypes = {
/** storybook name */
name: oneOfType([string, object]),
/** names of the used components */
componentsNames: array,
/** any node to render inside */
children: node,
/** size of the children column. Can be one of "singleComponentSizes" constant */
size: number,
};
Example #2
Source File: commonTypes.js From material-ui-color with MIT License | 6 votes |
color = oneOfType([
shape({
css: shape({
// TODO
}),
value: number,
hex: string,
raw: oneOfType([string, array, number, shape]),
name: string,
alpha: number,
rgb: arrayOf(number),
hsv: arrayOf(number),
hsl: arrayOf(number),
}),
string,
number,
])
Example #3
Source File: Swatches.js From wix-style-react with MIT License | 5 votes |
Swatches.propTypes = {
/** Array of colors to be shown as swatches */
colors: array,
/** Selected color */
selected: string,
/** Data-hook for testing */
dataHook: string,
/** Callback function when user clicks on a swatch. Returns color HEX string representation. */
onClick: func,
/** Size of swatches */
size: oneOf(['small', 'medium']),
/** If true shows no color option */
showClear: bool,
/** optional message to display in tooltip when showClear is true */
showClearMessage: node,
/** Callback function when user clicks on Add button and selects a color to be added. Returns color HEX string representation. */
onAdd: func,
/** Callback function when user changes color in Color Picker. Returns color HEX string representation. */
onChange: func,
/** Callback function when user closes Color Picker without picking color. */
onCancel: func,
/** If true shows add button which triggers colors picker*/
showAddButton: bool,
/** Text for add button tooltip*/
addButtonMessage: string,
/** Size of Plus icon inside add button */
addButtonIconSize: oneOf(['small', 'medium']),
/** Number of maximum columns. Default value is 6 */
columns: number,
/** Gap between swatches. Default value is 12 */
gap: number,
};
Example #4
Source File: CommandList.js From techno-broadlink with MIT License | 5 votes |
CommandList.propTypes = { commands: array, disabled: bool, handleDeleteClick: func, handleSendClick: func, };
Example #5
Source File: DashTabulator.react.js From dash-tabulator with MIT License | 4 votes |
DashTabulator.propTypes = {
/**
* The ID used to identify this component in Dash callbacks.
*/
id: PropTypes.string,
/**
* theme
*/
theme : PropTypes.string,
/**
* A label that will be printed when this component is rendered.
*/
columns: PropTypes.array,
/**
* The value displayed in the input.
*/
data: PropTypes.array,
/**
* Dash-assigned callback that should be called to report property changes
* to Dash, to make them available for callbacks.
*/
setProps: PropTypes.func,
/**
* Tabulator Options
*/
options: PropTypes.object,
/**
* rowClick captures the row that was clicked on
*/
rowClicked: PropTypes.object,
/**
* multiRowsClicked, when multiple rows are clicked
*/
multiRowsClicked: PropTypes.array,
/**
* cellEdited captures the cell that was clicked on
*/
cellEdited: PropTypes.object,
/**
* dataChanged captures the cell that was clicked on
*/
dataChanged: PropTypes.array,
/**
* downloadButtonType, takes a css style, text to display on button, type is file type to download
* e.g.
* downloadButtonType = {"css": "btn btn-primary", "text":"Export", "type":"xlsx"}
*/
downloadButtonType: PropTypes.object,
/**
* clearFilterButtonType, takes a css style, text to display on button
* e.g.
* clearFilterButtonType = {"css": "btn btn-primary", "text":"Export"}
*/
clearFilterButtonType: PropTypes.object,
/**
* initialHeaderFilter based on http://tabulator.info/docs/4.8/filter#header
* can take array of filters
*/
initialHeaderFilter: PropTypes.array,
/**
* dataFiltering based on http://tabulator.info/docs/4.8/callbacks#filter
* The dataFiltering callback is triggered whenever a filter event occurs, before the filter happens.
*/
dataFiltering: PropTypes.array ,
/**
* dataFiltered based on http://tabulator.info/docs/4.8/callbacks#filter
* The dataFiltered callback is triggered after the table dataset is filtered
*/
dataFiltered: PropTypes.object,
/**
* standard props not used by dash-tabulator directly
* can be used as part of custom javascript implementations
*/
rowClick : PropTypes.any,
tableBuilding : PropTypes.any,
tableBuilt : PropTypes.any,
rowDblClick : PropTypes.any,
rowContext : PropTypes.any,
rowTap : PropTypes.any,
rowDblTap : PropTypes.any,
rowTapHold : PropTypes.any,
rowAdded : PropTypes.any,
rowDeleted : PropTypes.any,
rowMoved : PropTypes.any,
rowUpdated : PropTypes.any,
rowSelectionChanged : PropTypes.any,
rowSelected : PropTypes.any,
rowDeselected : PropTypes.any,
rowResized : PropTypes.any,
cellClick : PropTypes.any,
cellDblClick : PropTypes.any,
cellContext : PropTypes.any,
cellTap : PropTypes.any,
cellDblTap : PropTypes.any,
cellTapHold : PropTypes.any,
cellEditing : PropTypes.any,
cellEditCancelled : PropTypes.any,
columnMoved : PropTypes.any,
columnResized : PropTypes.any,
columnTitleChanged : PropTypes.any,
columnVisibilityChanged : PropTypes.any,
headerClick : PropTypes.any,
headerDblClick : PropTypes.any,
headerContext : PropTypes.any,
headerTap : PropTypes.any,
headerDblTap : PropTypes.any,
headerTapHold : PropTypes.any,
htmlImporting : PropTypes.any,
htmlImported : PropTypes.any,
dataLoading : PropTypes.any,
dataLoaded : PropTypes.any,
ajaxRequesting : PropTypes.any,
ajaxResponse : PropTypes.any,
ajaxError : PropTypes.any,
dataSorting : PropTypes.any,
dataSorted : PropTypes.any,
renderStarted : PropTypes.any,
renderComplete : PropTypes.any,
pageLoaded : PropTypes.any,
localized : PropTypes.any,
dataGrouping : PropTypes.any,
dataGrouped : PropTypes.any,
groupVisibilityChanged : PropTypes.any,
groupClick : PropTypes.any,
groupDblClick : PropTypes.any,
groupContext : PropTypes.any,
groupTap : PropTypes.any,
groupDblTap : PropTypes.any,
groupTapHold : PropTypes.any,
movableRowsSendingStart : PropTypes.any,
movableRowsSent : PropTypes.any,
movableRowsSentFailed : PropTypes.any,
movableRowsSendingStop : PropTypes.any,
movableRowsReceivingStart : PropTypes.any,
movableRowsReceived : PropTypes.any,
movableRowsReceivedFailed : PropTypes.any,
movableRowsReceivingStop : PropTypes.any,
validationFailed : PropTypes.any,
clipboardCopied : PropTypes.any,
clipboardPasted : PropTypes.any,
clipboardPasteError : PropTypes.any,
downloadReady : PropTypes.any,
downloadComplete : PropTypes.any,
selectableCheck : PropTypes.any
};