mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
render list
This commit is contained in:
21
public/app/features/plugins/PluginList.tsx
Normal file
21
public/app/features/plugins/PluginList.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames/bind';
|
||||
import PluginListItem from './PluginListItem';
|
||||
|
||||
export default function PluginList({ plugins, layout }) {
|
||||
const listStyle = classNames({
|
||||
'card-section': true,
|
||||
'card-list-layout-grid': layout === 'grid',
|
||||
'card-list-layout-list': layout === 'list',
|
||||
});
|
||||
|
||||
return (
|
||||
<section className={listStyle}>
|
||||
<ol className="card-list">
|
||||
{plugins.map((plugin, index) => {
|
||||
return <PluginListItem plugin={plugin} key={`${plugin.name}-${index}`} />;
|
||||
})}
|
||||
</ol>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user