Skip to content
Snippets Groups Projects
Commit 26035854 authored by Jacopo Gasparetto's avatar Jacopo Gasparetto
Browse files

Add onClick callback prop

parent b51c6bfa
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ interface ButtonProps {
type?: "button" | "reset" | "submit"
title: string,
icon?: ReactNode
onClick?: () => void
}
export const Button = (props: ButtonProps) => {
......@@ -11,6 +12,7 @@ export const Button = (props: ButtonProps) => {
<button
className="border rounded p-4 hover:bg-neutral-200"
type={props.type}
onClick={props.onClick}
>
<div className="flex">
{props.icon ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment