Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

33 řádky
1.1 KiB

  1. import _extends from "@babel/runtime/helpers/esm/extends";
  2. import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
  3. import React from 'react';
  4. import PropTypes from 'prop-types';
  5. import classNames from 'classnames';
  6. import { mapToCssModules, tagPropType } from './utils';
  7. var propTypes = {
  8. tag: tagPropType,
  9. innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),
  10. className: PropTypes.string,
  11. cssModule: PropTypes.object
  12. };
  13. var defaultProps = {
  14. tag: 'a'
  15. };
  16. var CardLink = function CardLink(props) {
  17. var className = props.className,
  18. cssModule = props.cssModule,
  19. Tag = props.tag,
  20. innerRef = props.innerRef,
  21. attributes = _objectWithoutPropertiesLoose(props, ["className", "cssModule", "tag", "innerRef"]);
  22. var classes = mapToCssModules(classNames(className, 'card-link'), cssModule);
  23. return React.createElement(Tag, _extends({}, attributes, {
  24. ref: innerRef,
  25. className: classes
  26. }));
  27. };
  28. CardLink.propTypes = propTypes;
  29. CardLink.defaultProps = defaultProps;
  30. export default CardLink;