function propMerge(mergeStyle, props) {
  var glamorStyleKeys = Object.keys(props).filter(function (x) {
    return !!/data\-css\-([a-zA-Z0-9]+)/.exec(x);
  });

  // no glamor styles in obj
  if (glamorStyleKeys.length === 0) {
    return _extends({}, props, toStyle(mergeStyle));
  }

  if (glamorStyleKeys.length > 1) {
    console.warn('[glamor] detected multiple data attributes on an element. This may lead to unexpected style because of css insertion order.');

    // just append "mergeStyle" to props, because we dunno in which order glamor styles were added to props
    return _extends({}, props, toStyle(mergeStyle));
  }

  var dataCssKey = glamorStyleKeys[0];
  var cssData = props[dataCssKey];

  var mergedStyles = merge(mergeStyle, _defineProperty({}, dataCssKey, cssData));

  var restProps = assign({}, props);
  delete restProps[dataCssKey];

  return _extends({}, restProps, mergedStyles);
}
// use it for react components composing
use it for react components composing
use it for react components composing
function propMerge(mergeStyle, props) {
  var glamorStyleKeys = Object.keys(props).filter(function (x) {
    return !!/data\-css\-([a-zA-Z0-9]+)/.exec(x);
  });
  if (glamorStyleKeys.length === 0) {
    return _extends({}, props, toStyle(mergeStyle));
  }
  if (glamorStyleKeys.length > 1) {
    console.warn('[glamor] detected multiple data attributes on an element. This may lead to unexpected style because of css insertion order.');
    return _extends({}, props, toStyle(mergeStyle));
  }
  var dataCssKey = glamorStyleKeys[0];
  var cssData = props[dataCssKey];
  var mergedStyles = merge(mergeStyle, _defineProperty({}, dataCssKey, cssData));
  var restProps = assign({}, props);
  delete restProps[dataCssKey];
  return _extends({}, restProps, mergedStyles);
}
function propMerge ( mergeStyle , props ) { var glamorStyleKeys = Object . keys ( props ) . filter ( function ( x ) { return ! ! / data\-css\-([a-zA-Z0-9]+) / . exec ( x ) ; } ) ; if ( glamorStyleKeys . length === 0 ) { return _extends ( { } , props , toStyle ( mergeStyle ) ) ; } if ( glamorStyleKeys . length > 1 ) { console . warn ( '[glamor] detected multiple data attributes on an element. This may lead to unexpected style because of css insertion order.' ) ; return _extends ( { } , props , toStyle ( mergeStyle ) ) ; } var dataCssKey = glamorStyleKeys [ 0 ] ; var cssData = props [ dataCssKey ] ; var mergedStyles = merge ( mergeStyle , _defineProperty ( { } , dataCssKey , cssData ) ) ; var restProps = assign ( { } , props ) ; delete restProps [ dataCssKey ] ; return _extends ( { } , restProps , mergedStyles ) ; }
use it for react components composing
use it for react components composing
// no glamor styles in obj // just append "mergeStyle" to props, because we dunno in which order glamor styles were added to props