File size: 1,158 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# Plugins Browser Item
This component is used to display small infobox with the data of a plugin.
## How to use
```js
import PluginListItem from 'calypso/my-sites/plugins-browser-item';
function render() {
return (
<div>
<PluginListItem key={ slug } plugin={ plugin } isPlaceholder site={ site } />
</div>
);
}
```
## Props
- `plugin`: a plugin object. It defaults to a empty plugin used as placeholder
- `site`: a string containing the slug of the selected site
## Other
- `key`: Unique plugin key, this help react render a list better.
- `isPlaceholder`: Boolean, it marks if the item is a placeholder
- `iconSize`: number with the size of the icon. Defaulted to 40, since all the intertal css are adjusted around that value, it would be better to not change the default
- `variant`: the component can be used in compact or extended view. Defaults to `Compact`.
| variant | displays |
| -------- | --------------------------------------------------- |
| Compact | Icon, Name, Short Description |
| Extended | Icon, Name, Author, Short Description, Pricing Info |
|