mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 08:56:17 -04:00
16 lines
458 B
TypeScript
16 lines
458 B
TypeScript
import {FC, JSX, ReactElement} from "react";
|
|
|
|
export type IconButtonProps = {
|
|
icon: JSX.Element,
|
|
title: string|ReactElement,
|
|
onClick: ()=>void,
|
|
className?: string,
|
|
disabled?: boolean
|
|
}
|
|
|
|
export const IconButton:FC<IconButtonProps> = ({icon,className,onClick,title, disabled})=>{
|
|
return <button onClick={onClick} className={"icon-button "+ className} disabled={disabled}>
|
|
{icon}
|
|
<span>{title}</span>
|
|
</button>
|
|
}
|