UNPKG

@6thquake/react-material

Version:

React components that implement Google's Material Design.

20 lines (16 loc) 565 B
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; /** * @ignore - do not document. */ import React from 'react'; import FlexGrid from '@material-ui/core/Grid'; import PercentageGrid from './PercentageGrid'; function Grid(props) { const { type } = props, other = _objectWithoutPropertiesLoose(props, ["type"]); const Component = type === 'float' || type === 'percentage' || type === 'compatible' ? PercentageGrid : FlexGrid; return React.createElement(Component, other); } export default Grid;