123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import React from 'react'
- import PropTypes from 'prop-types'
- import CardPopup from '../common/CardPopup/CardPopup.jsx'
- import GenericContent from './ContentType/GenericContent.jsx'
- import FileContent from './ContentType/FileContent.jsx'
- import WsContent from './ContentType/WsContent.jsx'
-
- require('./PopupCreateContainer.styl')
-
- const PopupCreateContainer = props => {
- const FormCreateContent = (() => {
- switch (props.type) {
- case 'Workspace':
- return <WsContent />
- case 'File':
- return <FileContent />
- case 'folder':
- return <GenericContent />
- default:
- return <GenericContent />
- }
- })()
-
- // return (
- // <div className='popupcontent'>
- // <div className='popupcontent__container card'>
- // <div className='popupcontent__container__header' />
- // <div className='card-body nopadding'>
- // { FormCreateContent }
- // </div>
- // </div>
- // </div>
- // )
- return (
- <CardPopup customClass='popupCreateContent' onClose={props.onClose}>
- { FormCreateContent }
- </CardPopup>
- )
- }
-
- export default PopupCreateContainer
-
- PopupCreateContainer.propTypes = {
- type: PropTypes.string.isRequired,
- folder: PropTypes.object,
- onClose: PropTypes.func.isRequired
- }
|