/*!
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';

const GridSection = ({title, children, className = '', titleClassName, hasLastColSet = false}) => {
	return (
		<div className={classnames('grid-section', className, {'has-last-col-set': hasLastColSet})}>
			{title && <div className={`section-title ${titleClassName || ''}`}>{title}</div>}
			<div className='grid-items'>
				{children}
			</div>
		</div>
	);
};

GridSection.propTypes = {
	title: PropTypes.string,
	titleClassName: PropTypes.string,
	hasLastColSet: PropTypes.bool
};

export default GridSection;
