This repository has been archived on 2025-05-09. You can view files and clone it, but cannot push or open issues or pull requests.
2020-09-02 21:47:31 +03:00

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;