mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
26 lines
593 B
TypeScript
26 lines
593 B
TypeScript
import { TokenID } from '../../utils/models'
|
|
|
|
interface RSLocalButtonProps {
|
|
text: string
|
|
tooltip: string
|
|
disabled?: boolean
|
|
onInsert: (token: TokenID, key?: string) => void
|
|
}
|
|
|
|
function RSLocalButton({ text, tooltip, disabled, onInsert }: RSLocalButtonProps) {
|
|
return (
|
|
<button
|
|
type='button'
|
|
disabled={disabled}
|
|
onClick={() => { onInsert(TokenID.ID_LOCAL, text); }}
|
|
title={tooltip}
|
|
tabIndex={-1}
|
|
className='w-[1.5rem] h-7 cursor-pointer border rounded-none clr-btn-clear'
|
|
>
|
|
{text}
|
|
</button>
|
|
);
|
|
}
|
|
|
|
export default RSLocalButton;
|