37 lines
952 B
JavaScript
37 lines
952 B
JavaScript
import { Tabs } from 'antd';
|
|
import Background from 'client/Elements/Background';
|
|
import { Box, Flex } from 'client/UIKit/grid';
|
|
import React from 'react';
|
|
import styled from 'styled-components';
|
|
import SectionsList from './list';
|
|
import withTitle from 'client/hocs/withTitle';
|
|
|
|
const { TabPane } = Tabs;
|
|
|
|
const InputWrapper = styled(Box)`
|
|
width: 200px;
|
|
margin-horizontal: 10px;
|
|
`;
|
|
|
|
const Sections = props => (
|
|
<Background flex="3 0 25em">
|
|
<Tabs type="line">
|
|
{SectionsList.map(({ title, elements }, i) => (
|
|
<TabPane tab={title} key={i}>
|
|
<Flex alignItems="flex-end">
|
|
{elements.map(({ title, Component, props }, ie) => {
|
|
return (
|
|
<InputWrapper key={ie}>
|
|
{withTitle(title)(Component)(props)}
|
|
</InputWrapper>
|
|
);
|
|
})}
|
|
</Flex>
|
|
</TabPane>
|
|
))}
|
|
</Tabs>
|
|
</Background>
|
|
);
|
|
|
|
export default Sections;
|