Plugins Browser List
This component is used to display a list with the a parametrizable number of plugins of a certain category of the wordpress.org public plugin directory.
How to use
import { localize } from 'i18n-calypso';
import PluginsList from 'calypso/my-sites/plugins/plugins-browser-list';
const MyPluginsList = ( { pluginsData, translate } ) => (
<div>
<PluginsList
plugins={ pluginsData }
title={ translate( 'category name' ) }
size={ 6 }
site={ site }
addPlaceHolders
/>
</div>
);
export default localize( MyPluginsList );
Props
title: a stringplugins: a PluginsData objectsize: a number, the amount of plugins to be shownsite: a string containing the slug of the selected siteaddPlaceholders: if present, indicates that there should placeholders inserted after the real components listextended: if present, the PluginBrowserElement will contain extended info. Else, it will default to compactvariant: the component can be used with pagination or infinite scroll. This prop controls how to show placeholders when fetching additional data. Defaults toFixed.variant behavior Fixed Only shows the data after the initial fetch Paginated Replaces the list with placeholders while the next page is loading InfiniteScroll Appends placeholder at the end of the list while the next page is loading