Add JSDoc comments to Button component

This commit is contained in:
Davenludd 2024-03-20 13:53:51 +01:00
parent af92f4faee
commit bd27b549aa

View file

@ -1,3 +1,12 @@
/**
* Button component to display a button with text and onClick function.
*
* @param {Object} props - The component props.
* @param {string} props.text - The text to display on the button.
* @param {Function} props.onClick - The function to run when the button is clicked.
* @param {"submit" | "button" | "reset"} props.type - The type of button.
* @returns {JSX.Element} The rendered Button component.
*/
function Button({ function Button({
text, text,
onClick, onClick,