mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
17 lines
453 B
TypeScript
17 lines
453 B
TypeScript
![]() |
import {FC, 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>
|
||
|
}
|