mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-11-29 17:03:33 +01:00
22 lines
480 B
JavaScript
22 lines
480 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React, { forwardRef } from 'react';
|
|
import cx from 'classnames';
|
|
|
|
const Card = forwardRef(({ className, children, ...rest }, ref) => {
|
|
return (
|
|
<div ref={ref} className={cx('card', className)} {...rest}>
|
|
{children}
|
|
</div>
|
|
);
|
|
});
|
|
|
|
Card.displayName = 'Card';
|
|
|
|
Card.propTypes = {
|
|
className: PropTypes.string,
|
|
children: PropTypes.node.isRequired,
|
|
};
|
|
|
|
Card.defaultProps = { className: undefined };
|
|
|
|
export default Card;
|