Create ComponentsList

Signed-off-by: Julien Boudringhin <julien.boudringhin@gmail.com>
This commit is contained in:
jbo@lachose.fr 2020-10-26 16:13:45 +01:00 committed by Julien Boudringhin
parent 6887cc28e9
commit c4a36471cc
No known key found for this signature in database
GPG Key ID: A57C13F68CBD7225
2 changed files with 12 additions and 5 deletions

View File

@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { Collapse } from 'reactstrap';
import Banner from './Banner';
import ComponentsList from './ComponentsList';
import DynamicComponentCard from '../DynamicComponentCard';
const CategoryItem = ({
@ -26,10 +27,7 @@ const CategoryItem = ({
<Banner onClickToggle={onClickToggle} isFirst={isFirst} isOpen={isOpen} category={category} />
<Collapse isOpen={isOpen} onExited={handleExited}>
{showComponents && (
<div
className="componentsList"
style={{ paddingTop: '10px', paddingLeft: '15px', paddingRight: '15px' }}
>
<ComponentsList className="componentsList">
{components.map(component => {
const {
info: { icon, name: friendlyName },
@ -48,7 +46,7 @@ const CategoryItem = ({
/>
);
})}
</div>
</ComponentsList>
)}
</Collapse>
</>

View File

@ -0,0 +1,9 @@
import styled from 'styled-components';
const ComponentsList = styled.div`
padding-top: 10px;
padding-left: 15px;
padding-right: 15px;
`;
export default ComponentsList;