You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
pizza.krasnikov.pro/.history/components/UI/Button_20220518160952.tsx

22 lines
655 B

import React from 'react';
import classNames from 'classnames';
interface KonvaMouseEvent extends React.MouseEvent<HTMLElement> {
target: KonvaTextEventTarget
}
interface Props {
align: string;
styles: string;
children?: React.ReactNode;
onClick: {(event: KonvaMouseEvent) => {
makeMove(ownMark, event.target.index)};
}
export const Button: React.FC<Props> = ({onClick, align, styles, children}) => {
return(
<div className= {classNames('button_main', align )}>
<button className = {classNames('button', styles )} onClick = {(event) => onClick(event)}> {children} </button>
</div>
)
}