forked from React-Group/interstellar_ai
23 lines
682 B
TypeScript
23 lines
682 B
TypeScript
|
import React from 'react';
|
||
|
|
||
|
interface ButtonSettingProps {
|
||
|
label: string; // The label to display on the button
|
||
|
onClick: () => void; // The function to call when the button is clicked
|
||
|
className?: string; // Optional additional classes for styling
|
||
|
}
|
||
|
|
||
|
const ButtonSetting: React.FC<ButtonSettingProps> = ({ label, onClick, className }) => {
|
||
|
return (
|
||
|
<div className="settings-option">
|
||
|
<button
|
||
|
onClick={onClick} // Call the onClick function when the button is clicked
|
||
|
className={className} // Apply any additional classes
|
||
|
>
|
||
|
{label} {/* Display the label on the button */}
|
||
|
</button>
|
||
|
</div>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default ButtonSetting;
|