mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
24 lines
604 B
JavaScript
24 lines
604 B
JavaScript
import React, { PureComponent } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import classnames from 'classnames';
|
|
|
|
export default class Card extends PureComponent {
|
|
static propTypes = {
|
|
className: PropTypes.string,
|
|
overrideClassName: PropTypes.bool,
|
|
title: PropTypes.string,
|
|
children: PropTypes.node,
|
|
};
|
|
|
|
render() {
|
|
const { className, overrideClassName, title } = this.props;
|
|
|
|
return (
|
|
<div className={classnames({ card: !overrideClassName }, className)}>
|
|
<div className="card__title">{title}</div>
|
|
{this.props.children}
|
|
</div>
|
|
);
|
|
}
|
|
}
|