UNPKG

@nitive/whitepaper-react

Version:

React components automatically generated by whitepaper-bem

53 lines (49 loc) 3.15 kB
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } import React from 'react'; import PropTypes from 'prop-types'; import { Bem } from '../../../_internal/bem'; import './pt-table__col.post.css'; import './_align/pt-table__col_align_center.post.css'; import './_align/pt-table__col_align_right.post.css'; import './_grow/pt-table__col_grow_evenly.post.css'; import './_width/pt-table__col_width_10.post.css'; import './_width/pt-table__col_width_100.post.css'; import './_width/pt-table__col_width_15.post.css'; import './_width/pt-table__col_width_20.post.css'; import './_width/pt-table__col_width_25.post.css'; import './_width/pt-table__col_width_30.post.css'; import './_width/pt-table__col_width_35.post.css'; import './_width/pt-table__col_width_40.post.css'; import './_width/pt-table__col_width_45.post.css'; import './_width/pt-table__col_width_5.post.css'; import './_width/pt-table__col_width_50.post.css'; import './_width/pt-table__col_width_60.post.css'; import './_width/pt-table__col_width_55.post.css'; import './_width/pt-table__col_width_65.post.css'; import './_width/pt-table__col_width_70.post.css'; import './_width/pt-table__col_width_75.post.css'; import './_width/pt-table__col_width_80.post.css'; import './_width/pt-table__col_width_85.post.css'; import './_width/pt-table__col_width_95.post.css'; import './_width/pt-table__col_width_90.post.css'; var modNames = ['align', 'grow', 'width']; export function PtTableCol(_ref) { var additionalModNames = _ref.modNames, props = _objectWithoutProperties(_ref, ["modNames"]); return React.createElement(Bem, _extends({ block: "pt-table", elem: "col" }, props, { modNames: modNames.concat(additionalModNames || []) })); } PtTableCol.propTypes = { tag: PropTypes.string, className: PropTypes.string, modNames: PropTypes.arrayOf(PropTypes.string), align: PropTypes.oneOf(['center', 'right']), grow: PropTypes.oneOf(['evenly']), width: PropTypes.oneOf(['10', '100', '15', '20', '25', '30', '35', '40', '45', '5', '50', '55', '60', '65', '70', '75', '80', '85', '95', '90']) };