Dwinzo_dev/app/src/components/ui/inputs/LabledButton.tsx

27 lines
661 B
TypeScript
Raw Normal View History

2025-03-25 06:17:41 +00:00
import React from "react";
interface LabeledButtonProps {
label: string; // Label for the button
onClick?: () => void; // Function to call when the button is clicked
disabled?: boolean; // Optional prop to disable the button
value?: string;
}
const LabeledButton: React.FC<LabeledButtonProps> = ({
label,
onClick,
disabled = false,
value = "Click here",
}) => {
return (
<div className="labeled-button-container">
<div className="label">{label}</div>
<button className="button" onClick={onClick} disabled={disabled}>
{value}
</button>
</div>
);
};
export default LabeledButton;