How to use the @wordpress/compose.withInstanceId function in @wordpress/compose

To help you get started, we’ve selected a few @wordpress/compose 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 WordPress / gutenberg / packages / components / src / modal / index.js View on Github external
Modal.defaultProps = {
	bodyOpenClassName: 'modal-open',
	role: 'dialog',
	title: null,
	focusOnMount: true,
	shouldCloseOnEsc: true,
	shouldCloseOnClickOutside: true,
	isDismissible: true,
	/* accessibility */
	aria: {
		labelledby: null,
		describedby: null,
	},
};

export default withInstanceId( Modal );
github Automattic / wp-calypso / packages / jetpack-blocks / src / blocks / contact-form / components / jetpack-field-checkbox.jsx View on Github external
onChange={ value => setAttributes( { defaultValue: value } ) }
							/>
							 setAttributes( { id: value } ) }
							/>
						
					
				
			}
		/>
	);
};

export default withInstanceId( JetpackFieldCheckbox );
github WordPress / gutenberg / packages / block-library / src / spacer / edit.js View on Github external
setAttributes( {
									height: spacerHeight,
								} );
							} }
							value={ inputHeightValue }
							min="20"
							step="10"
						/>
					
				
			
		
	);
};

export default withInstanceId( SpacerEdit );
github ampproject / amp-wp / assets / src / stories-editor / components / font-family-picker / index.js View on Github external
/>
		
	);
}

FontFamilyPicker.propTypes = {
	value: PropTypes.string,
	fonts: PropTypes.arrayOf( PropTypes.shape( {
		value: PropTypes.string,
		label: PropTypes.string,
	} ) ),
	onChange: PropTypes.func,
	instanceId: PropTypes.number.isRequired,
};

export default withInstanceId( FontFamilyPicker );
github eventespresso / event-espresso-core / assets / ZZZ / components / ui / entity-list-filter-bar / entity-list-filter-bar.js View on Github external
/>
		
	);
};

EntityListFilterBar.propTypes = {
	listId: PropTypes.string.isRequired,
	defaultView: PropTypes.string,
	defaultPerPage: PropTypes.oneOfType( [
		PropTypes.string,
		PropTypes.number,
	] ),
	entityFilters: PropTypes.object,
};

export default withInstanceId( EntityListFilterBar );
github eventespresso / event-espresso-core / assets / ZZZ / components / ui / responsive-table / responsive-table.js View on Github external
classes: PropTypes.shape( {
		tableClass: PropTypes.string,
		headerClass: PropTypes.string,
		headerRowClass: PropTypes.string,
		headerThClass: PropTypes.string,
		bodyClass: PropTypes.string,
		bodyRowClass: PropTypes.string,
		bodyThClass: PropTypes.string,
		bodyTdClass: PropTypes.string,
		footerClass: PropTypes.string,
		footerRowClass: PropTypes.string,
		footerThClass: PropTypes.string,
	} ),
};

export default withInstanceId( ResponsiveTable );
github WordPress / gutenberg / packages / list-reusable-blocks / src / components / import-form / index.js View on Github external
/>
				<button disabled="{" type="submit">
					{ _x( 'Import', 'button label' ) }
				</button>
			
		);
	}
}

export default withInstanceId( ImportForm );
github gambitph / Stackable / src / components / responsive-toggle / index.js View on Github external
label={ labels[ screen ] }
							/&gt;
						)
					} )
				}
			
		)
	}
}

ResponsiveToggle.defaultProps = {
	screens: [ 'desktop' ],
	onChangeScreen: () =&gt; {},
}

export default withInstanceId( ResponsiveToggle )
github gambitph / Stackable / src / components / four-number-control / index.js View on Github external
defaultLocked: true,
	top: '',
	right: '',
	bottom: '',
	left: '',
	units: [ 'px' ],
	unit: 'px',
	onChangeUnit: () => {},
	screens: [ 'desktop' ],
	enableTop: true,
	enableRight: true,
	enableBottom: true,
	enableLeft: true,
}

export default withInstanceId( FourNumberControl )
github Automattic / wp-calypso / client / gutenberg / editor / edit-post / components / sidebar / post-schedule / index.js View on Github external
aria-expanded={ isOpen }
								aria-live="polite"
								isLink
							&gt;
								
							
						
					) }
					renderContent={ () =&gt;  }
				/&gt;
			
		
	);
}

export default withInstanceId( PostSchedule );