update: hooks, web

This commit is contained in:
Vick Scarlet
2026-08-11 02:17:31 +08:00
parent 727fe5de77
commit 5353edd6a1
67 changed files with 2339 additions and 2243 deletions
+22
View File
@@ -0,0 +1,22 @@
import type { Talent } from '@remake/data/talent'
import talents from '@remake/data/talent'
import cx from 'classnames'
import './Talent.css'
export interface TalentProps {
id: Talent['id']
selected: boolean
}
export function TalentComponent({ id, selected }: TalentProps) {
const talent = talents.get(id)
if (!talent) return null
const grade = talent?.grade ?? 0
return (
<div className={cx('talent', `talent-grade-${grade}`, { selected })}>
<span className="talent-name">{talent.name}</span>
<span className="talent-description">{talent.description}</span>
</div>
)
}
export default TalentComponent