Add onclick for simple text component

This commit is contained in:
Arnaud 2024-10-21 15:10:41 +02:00
parent 8a82197bc3
commit 1a30b30ef2
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
1 changed files with 5 additions and 2 deletions

View File

@ -34,6 +34,8 @@ type Props = {
center?: boolean;
bold?: boolean;
onClick?: () => void;
};
export function SimpleText({
@ -41,6 +43,7 @@ export function SimpleText({
className = "",
center,
size = "normal",
onClick,
style,
children,
bold,
@ -49,14 +52,14 @@ export function SimpleText({
if (size === "small") {
return (
<small className={c} style={style}>
<small onClick={onClick} className={c} style={style}>
{children}
</small>
);
}
return (
<span className={c} style={style}>
<span onClick={onClick} className={c} style={style}>
{children}
</span>
);