You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
376 B
13 lines
376 B
import React from 'react';
|
|
import styles from './mybutton.module.css'; // 假设你有一个CSS模块文件来定义样式
|
|
|
|
const MyButton = ({ onClick, children, className = '' }) => (
|
|
<button
|
|
onClick={onClick}
|
|
className={`${styles.myButton} ${className}`} // 使用CSS模块样式
|
|
>
|
|
{children}
|
|
</button>
|
|
);
|
|
|
|
export default MyButton; |