Disabled pointer events for dice tray results text

This commit is contained in:
Mitchell McCaffrey 2020-05-27 18:41:34 +10:00
parent 6f51fd8cbe
commit a567cee289
2 changed files with 5 additions and 2 deletions

View File

@ -90,6 +90,7 @@ function DiceControls({
right: 0, right: 0,
display: "flex", display: "flex",
color: "white", color: "white",
pointerEvents: "none",
}} }}
> >
<DiceResults <DiceResults

View File

@ -43,6 +43,7 @@ function DiceResults({ diceRolls, onDiceClear, onDiceReroll }) {
title="Clear Dice" title="Clear Dice"
aria-label="Clear Dice" aria-label="Clear Dice"
onClick={onDiceClear} onClick={onDiceClear}
sx={{ pointerEvents: "all" }}
> >
<ClearDiceIcon /> <ClearDiceIcon />
</IconButton> </IconButton>
@ -56,7 +57,7 @@ function DiceResults({ diceRolls, onDiceClear, onDiceReroll }) {
<Text <Text
variant="heading" variant="heading"
as="h1" as="h1"
sx={{ fontSize: 5 }} sx={{ fontSize: 5, userSelect: "none" }}
mb={diceRolls.length === 1 ? "24px" : 0} mb={diceRolls.length === 1 ? "24px" : 0}
> >
{diceRolls.reduce((accumulator, dice) => accumulator + dice.roll, 0)} {diceRolls.reduce((accumulator, dice) => accumulator + dice.roll, 0)}
@ -67,7 +68,7 @@ function DiceResults({ diceRolls, onDiceClear, onDiceReroll }) {
title={"Show Dice Details"} title={"Show Dice Details"}
onClick={() => setIsExpanded(!isExpanded)} onClick={() => setIsExpanded(!isExpanded)}
variant="secondary" variant="secondary"
sx={{ display: "flex", height: "24px" }} sx={{ display: "flex", height: "24px", pointerEvents: "all" }}
> >
{isExpanded ? rolls : rolls.slice(0, maxDiceRollsShown)} {isExpanded ? rolls : rolls.slice(0, maxDiceRollsShown)}
{!isExpanded && ( {!isExpanded && (
@ -85,6 +86,7 @@ function DiceResults({ diceRolls, onDiceClear, onDiceReroll }) {
title="Reroll Dice" title="Reroll Dice"
aria-label="Reroll Dice" aria-label="Reroll Dice"
onClick={onDiceReroll} onClick={onDiceReroll}
sx={{ pointerEvents: "all" }}
> >
<RerollDiceIcon /> <RerollDiceIcon />
</IconButton> </IconButton>