mirror of
https://github.com/evgen-app/chess-reclash-lending.git
synced 2024-12-01 04:33:44 +03:00
22 lines
583 B
TypeScript
22 lines
583 B
TypeScript
|
import styles from "./button.module.css"
|
||
|
import React from "react"
|
||
|
import bgGreen from "./bgBtnGreen.svg"
|
||
|
import bgBlue from "./bgBtnBlue.svg"
|
||
|
|
||
|
interface ReclashButtonIE{
|
||
|
class?:string
|
||
|
onClick:()=>void
|
||
|
color: "green"|"blue"|"red"
|
||
|
children?:JSX.Element|string|JSX.Element[]
|
||
|
}
|
||
|
|
||
|
export const ReclashButton:React.FC<ReclashButtonIE> = (props) =>{
|
||
|
return(
|
||
|
<div
|
||
|
onClick={()=>props.onClick()}
|
||
|
className={styles.reclashBtn + " "+ styles[props.color] + " " + props.class}
|
||
|
>
|
||
|
{props.children}
|
||
|
</div>
|
||
|
)
|
||
|
}
|