Basic loop

This commit is contained in:
Melvin Valster
2019-07-12 09:58:15 +02:00
parent 426f6c14fd
commit 85f9208b4a
15 changed files with 767 additions and 64 deletions
+28
View File
@@ -0,0 +1,28 @@
import React from 'react'
import './TalentSlot.scss'
interface Props {
key: number
talent: Talent
/** Points spent */
points: number
onClick?: (e: any) => void
}
export const TalentSlot: React.FC<Props> = (props) => {
const { talent, points } = props
const requiredPointsSpent = talent.row * 5
return (
<div
className="talent"
title={talent.name}
data-row={talent.row}
data-col={talent.column}
onClick={props.onClick}
>
<small>{talent.name}</small>
<div className="talent__rank">{points}/{talent.ranks.length}</div>
</div>
)
}