pouncejs
Version:
A collection of UI components from Panther labs
26 lines (24 loc) • 847 B
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import React from 'react';
import Box from '../Box';
import useCardVariantBackground from './useCardVariantBackground';
/**
* Extends <a href="/#/Box">Box</a>
*
* A card is simply a basic layout component with additional style props.
*/
export var Card = /*#__PURE__*/React.forwardRef(function Card(_ref, ref) {
var _ref$variant = _ref.variant,
variant = _ref$variant === void 0 ? 'light' : _ref$variant,
rest = _objectWithoutPropertiesLoose(_ref, ["variant"]);
var bg = useCardVariantBackground({
variant: variant
});
return /*#__PURE__*/React.createElement(Box, _extends({
ref: ref,
bg: bg,
borderRadius: "medium"
}, rest));
});
export default Card;