Add JSDoc comments to Button component
This commit is contained in:
parent
af92f4faee
commit
bd27b549aa
1 changed files with 9 additions and 0 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue