import React from "react";
import style from "./style";

/**
 * This component lets you further customize the Grid enclosure by consuming a variable
 * number of Grid columns.
 * @param {object} props The props
 * @returns {function} The component
 */
const Cell = props => (
  <div
    role="cell"
    style={{ ...style.generateCellStyle(props), ...props.style }}
    {...props}
  >
    {props.children}
  </div>
);

Cell.defaultProps = {
  grow: 0,
  basis: "auto",
  align: "auto",
  order: 0
};

export default Cell;
