Stylings / Restructuring

This commit is contained in:
Sebastian Seedorf
2022-08-14 10:49:11 +02:00
parent 7682aeaea1
commit 76f508a847
17 changed files with 333 additions and 137 deletions

View File

@@ -0,0 +1,21 @@
import {FC, HTMLProps} from "react";
import {GraphNode} from "../../shared/ProducingGraph/ProducingGraph";
import {Recipe} from "../../../src/types";
import cx from "classnames";
import styles from "./NodeDetails.module.css";
import {RecipeSpan} from "../../home/Recipe/Recipe";
export type DetailGraphNode = GraphNode<{
recipes: Recipe[]
}>
interface Props extends HTMLProps<HTMLDivElement> {
node: DetailGraphNode
}
export const NodeDetails: FC<Props> = ({node, className, ...props}) => {
return <div {...props} className={cx(className, styles.root)}>
<h3>{node.name}</h3>
{node.recipes.map((recipe, idx) => <RecipeSpan key={idx} recipe={recipe}/>)}
</div>
}