This commit is contained in:
Sebastian Seedorf
2022-08-18 09:20:00 +02:00
parent 92b762bbd2
commit de95f57b18
60 changed files with 3450 additions and 994 deletions

View File

@@ -1,9 +1,9 @@
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";
import { FC, HTMLProps } from 'react'
import { Recipe } from '../../../src/types'
import cx from 'classnames'
import styles from './NodeDetails.module.css'
import { RecipeSpan } from '../../home/Recipe/Recipe'
import { GraphNode } from '../../../src/graph-untangle/types'
export type DetailGraphNode = GraphNode<{
recipes: Recipe[]
@@ -13,9 +13,13 @@ 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>
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>
)
}