Akane1217 | 65b61a7 | 2025-05-17 13:52:25 +0800 | [diff] [blame] | 1 | import React from 'react';
|
| 2 | import PropTypes from 'prop-types';
|
| 3 |
|
| 4 | const ActionCard = ({ title, subtitle, icon, onClick }) => {
|
| 5 | return (
|
| 6 | <div className="action-card" onClick={onClick}>
|
| 7 | {icon && <div className="action-icon">{icon}</div>}
|
| 8 | <div className="action-content">
|
| 9 | <h3>{title}</h3>
|
| 10 | <p>{subtitle}</p>
|
| 11 | </div>
|
| 12 | </div>
|
| 13 | );
|
| 14 | };
|
| 15 |
|
| 16 | ActionCard.propTypes = {
|
| 17 | title: PropTypes.string.isRequired,
|
| 18 | subtitle: PropTypes.string,
|
| 19 | icon: PropTypes.node,
|
| 20 | onClick: PropTypes.func
|
| 21 | };
|
| 22 |
|
| 23 | export default ActionCard; |