UNPKG

vcc-ui

Version:

A React library for building user interfaces at Volvo Cars

47 lines 1.01 kB
import PropTypes from 'prop-types'; import React from 'react'; import { Flex } from '../flex'; /** * Groups a number of columns and can align them. * @deprecated */ export const Row = _ref => { let { children, align = 'start' } = _ref; return /*#__PURE__*/React.createElement(Flex, { extend: rowCSS({ align }) }, children); }; const rowCSS = _ref2 => { let { align } = _ref2; return _ref3 => { let { theme } = _ref3; return { boxSizing: 'border-box', justifyContent: align === 'center' ? 'center' : 'flex-' + align, marginLeft: -theme.baselineGrid, marginRight: -theme.baselineGrid, flexDirection: 'row', flexWrap: 'wrap', fromL: { marginLeft: theme.baselineGrid * -1.5, marginRight: theme.baselineGrid * -1.5 } }; }; }; Row.propTypes = { /** Align columns */ align: PropTypes.oneOf(['start', 'end', 'center']), /** A JSX node */ // @ts-ignore children: PropTypes.node };