Skip to content

Commit

Permalink
Merge pull request #47 from TheVanadium/solution-item-label
Browse files Browse the repository at this point in the history
feat: solution item label in summary
  • Loading branch information
zachpmanson authored Feb 4, 2024
2 parents 1e23dd7 + 8d82eed commit 1b4d605
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Popup.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ export default function Popup({
});
};

// get name of solution item for label
const { items } = useGlobal();
const solutionName =
"minecraft:" + solution ? items["minecraft:" + solution]?.name : undefined;

return (
<>
<Transition appear show={isOpen} as={Fragment}>
Expand Down Expand Up @@ -94,6 +99,9 @@ export default function Popup({
<Dialog.Panel className="w-full max-w-sm transform overflow-hidden rounded-2xl inv-background text-left align-middle shadow-xl transition-all">
<div className="flex flex-col items-center gap-2">
<Slot item={`minecraft:${solution}`} clickable={false} />
<Dialog.Description className="text-med font-medium leading-6 text-gray-900">
{`Solution: ` + solutionName}
</Dialog.Description>
<Dialog.Title
as="h3"
className="text-lg font-medium leading-6 text-gray-900"
Expand Down

0 comments on commit 1b4d605

Please sign in to comment.