PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 3.21.1
GiveWP – Donation Plugin and Fundraising Platform v3.21.1
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / Views / Components / Card / index.js
index.js
25 lines 725 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Import vendor dependencies
2 import PropTypes from 'prop-types';
3 // Import styles
4 import styles from './style.module.scss';
5
6 const Card = ({width = 4, title = null, children = null}) => {
7 return (
8 <div className={styles.card} style={{gridColumn: 'span ' + width}}>
9 {title && <div className={styles.title}>{title}</div>}
10 <div className={styles.content}>{children}</div>
11 </div>
12 );
13 };
14
15 Card.propTypes = {
16 // Number of grid columns for Card to span, out of 12
17 width: PropTypes.number,
18 // Title of card
19 title: PropTypes.string,
20 // Elements to displayed in content area of card (eg: Chart, List)
21 children: PropTypes.node.isRequired,
22 };
23
24 export default Card;
25