DEPRECATED. Please go to https://github.com/10up/component-library
NOTE: This is intended to be a boilerplate component. Clone this component, remove this comment, and use the rest as a starting point for your new component.
Component Description
npm install --save @10up/component-name
View official documentation for this package
Clone this repo and import component.js
and component.css
from the dist/
directory.
Add API information here.
onCreate
: Called after the component is initialized on page load
This is the markup template expected by the component.
<div class="component">
</div>
The styles can be imported into your existing codebase by using PostCSS imports, or by including the standalone CSS file in your project.
@import '@10up/component-name';
Include the component.css
file from the dist/
directory.
Create a new instance by supplying the selector to use for the component and an object containing any necessary callback functions.
import TenUpScaffold from '@10up/tenup-scaffold';
TenUpScaffold( '.component', {
onCreate: function() {
console.log( 'onCreate callback' );
}
} );
Example implementations can be found in the demo
directory.
Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.