diff --git a/src/components/dice/DiceButtons.js b/src/components/dice/DiceButtons.js
index 6e1fe8d..235d2c2 100644
--- a/src/components/dice/DiceButtons.js
+++ b/src/components/dice/DiceButtons.js
@@ -58,6 +58,9 @@ function DiceButtons({
alignItems: "center",
flexDirection: "column",
borderRadius: "4px",
+ position: "absolute",
+ top: "0",
+ left: "0",
}}
p={2}
bg="overlay"
diff --git a/src/components/dice/DiceControls.js b/src/components/dice/DiceControls.js
deleted file mode 100644
index 9e002a4..0000000
--- a/src/components/dice/DiceControls.js
+++ /dev/null
@@ -1,65 +0,0 @@
-import React from "react";
-
-import DiceButtons from "./DiceButtons";
-import DiceResults from "./DiceResults";
-
-function DiceControls({
- onDiceAdd,
- onDiceClear,
- onDiceReroll,
- onDiceLoad,
- diceTraySize,
- onDiceTraySizeChange,
- shareDice,
- onShareDiceChage,
- diceRolls,
- onDiceRollsChange,
-}) {
- return (
- <>
-
- {
- onDiceClear();
- onDiceRollsChange([]);
- }}
- onDiceReroll={onDiceReroll}
- />
-
-
- {
- onDiceAdd(style, type);
- onDiceRollsChange([...diceRolls, { type, roll: "unknown" }]);
- }}
- onDiceLoad={onDiceLoad}
- onDiceTraySizeChange={onDiceTraySizeChange}
- diceTraySize={diceTraySize}
- shareDice={shareDice}
- onShareDiceChange={onShareDiceChage}
- />
-
- >
- );
-}
-
-export default DiceControls;
diff --git a/src/components/dice/DiceResults.js b/src/components/dice/DiceResults.js
index 0bac0e2..c0f1965 100644
--- a/src/components/dice/DiceResults.js
+++ b/src/components/dice/DiceResults.js
@@ -34,13 +34,19 @@ function DiceResults({ diceRolls, onDiceClear, onDiceReroll }) {
return (
{getDiceRollTotal(diceRolls)}
@@ -79,11 +84,11 @@ function DiceResults({ diceRolls, onDiceClear, onDiceReroll }) {
)}
) : (
- {rolls}
+ {rolls}
)}
+ {
+ handleDiceClear();
+ onDiceRollsChange([]);
+ }}
+ onDiceReroll={handleDiceReroll}
+ />
- {
+ handleDiceAdd(style, type);
+ onDiceRollsChange([...diceRolls, { type, roll: "unknown" }]);
+ }}
+ onDiceLoad={handleDiceLoad}
+ onDiceTraySizeChange={setDiceTraySize}
+ diceTraySize={diceTraySize}
+ shareDice={shareDice}
+ onShareDiceChange={onShareDiceChage}
/>
{isLoading && (