Add onclick for simple text component
This commit is contained in:
parent
8a82197bc3
commit
1a30b30ef2
|
@ -34,6 +34,8 @@ type Props = {
|
||||||
center?: boolean;
|
center?: boolean;
|
||||||
|
|
||||||
bold?: boolean;
|
bold?: boolean;
|
||||||
|
|
||||||
|
onClick?: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function SimpleText({
|
export function SimpleText({
|
||||||
|
@ -41,6 +43,7 @@ export function SimpleText({
|
||||||
className = "",
|
className = "",
|
||||||
center,
|
center,
|
||||||
size = "normal",
|
size = "normal",
|
||||||
|
onClick,
|
||||||
style,
|
style,
|
||||||
children,
|
children,
|
||||||
bold,
|
bold,
|
||||||
|
@ -49,14 +52,14 @@ export function SimpleText({
|
||||||
|
|
||||||
if (size === "small") {
|
if (size === "small") {
|
||||||
return (
|
return (
|
||||||
<small className={c} style={style}>
|
<small onClick={onClick} className={c} style={style}>
|
||||||
{children}
|
{children}
|
||||||
</small>
|
</small>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className={c} style={style}>
|
<span onClick={onClick} className={c} style={style}>
|
||||||
{children}
|
{children}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue