Skip to content

Commit 5abb2c4

Browse files
authored
Merge branch 'master' into chore/update-gha-ci-tasks
2 parents 2ac1b22 + 9dc2d3c commit 5abb2c4

File tree

4 files changed

+379
-410
lines changed

4 files changed

+379
-410
lines changed

cypress/e2e/route/Oracle.cy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe("/oracle", () => {
44
describe("Given I want to ask a question to the oracle", () => {
55
it("should ask questions to the oracle ", () => {
66
Fari.start();
7-
Fari.getByText("Consult the Oracle").click();
7+
Fari.visit("/oracle");
88

99
askOracle();
1010

lib/components/Page/NavLink.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export function NavLink(props: {
2323
endIcon?: React.ReactNode;
2424
children: React.ReactNode;
2525
}) {
26-
const theme = useTheme();
2726
if (props.to) {
2827
return (
2928
<Tooltip title={props.tooltip ?? ""}>

lib/routes/Character/components/CharacterDialog/components/CircleTextField.tsx

+8-19
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ import Fade from "@mui/material/Fade";
66
import IconButton from "@mui/material/IconButton";
77
import { useTheme } from "@mui/material/styles";
88
import TextField from "@mui/material/TextField";
9-
import React, { useContext, useState } from "react";
9+
import React, { useState } from "react";
1010
import { ConditionalWrapper } from "../../../../../components/ConditionalWrapper/ConditionalWrapper";
1111
import { Delays } from "../../../../../constants/Delays";
1212
import { IDataCyProps } from "../../../../../domains/cypress/types/IDataCyProps";
1313
import { useLazyState } from "../../../../../hooks/useLazyState/useLazyState";
14-
import { MiniThemeContext } from "../MiniThemeContext";
1514

1615
export function CircleTextField(
1716
props: {
@@ -27,8 +26,6 @@ export function CircleTextField(
2726
onContextMenu?(event: React.MouseEvent<HTMLElement, MouseEvent>): void;
2827
} & IDataCyProps
2928
) {
30-
const miniTheme = useContext(MiniThemeContext);
31-
3229
const theme = useTheme();
3330
const [hover, setHover] = useState(false);
3431
const [focus, setFocus] = useState(false);
@@ -100,24 +97,18 @@ export function CircleTextField(
10097
setValue("");
10198
} else {
10299
const parsed = parseInt(e.target.value);
103-
if (parsed > 999) {
104-
setValue("999");
105-
} else {
106-
setValue(parsed.toString());
107-
}
100+
setValue(parsed.toString());
108101
}
109102
}}
110103
InputProps={{
111104
sx: {
112105
"cursor": cursor,
113-
"width": "3rem",
106+
"width": "5rem",
114107
"height": "3rem",
115-
"borderRadius": "50%",
116-
"border": `2px solid ${
117-
props.borderColor ?? miniTheme.textPrimary
118-
}`,
108+
"px": "0.5rem",
109+
"font-family": "monospace",
119110
"outline": "none",
120-
"background": props.highlight ? miniTheme.textPrimary : "inherit",
111+
"background": (theme) => theme.palette.action.hover,
121112
"&&": {
122113
color: "inherit",
123114
},
@@ -164,7 +155,6 @@ export function CircleTextField(
164155
{!props.readonly && props.onDecrement && (
165156
<Fade in={areCounterButtonsVisible}>
166157
<IconButton
167-
size="small"
168158
data-cy={`${props.dataCy}.decrement`}
169159
sx={{
170160
"position": "absolute",
@@ -177,15 +167,14 @@ export function CircleTextField(
177167
onClick={props.onDecrement}
178168
>
179169
<RemoveCircleOutlineOutlinedIcon
180-
sx={{ width: "1.1rem", height: "1.1rem" }}
170+
sx={{ width: "1.5rem", height: "1.5rem" }}
181171
/>
182172
</IconButton>
183173
</Fade>
184174
)}
185175
{!props.readonly && props.onIncrement && (
186176
<Fade in={areCounterButtonsVisible}>
187177
<IconButton
188-
size="small"
189178
data-cy={`${props.dataCy}.increment`}
190179
sx={{
191180
"position": "absolute",
@@ -198,7 +187,7 @@ export function CircleTextField(
198187
onClick={props.onIncrement}
199188
>
200189
<AddCircleOutlineOutlinedIcon
201-
sx={{ width: "1.1rem", height: "1.1rem" }}
190+
sx={{ width: "1.5rem", height: "1.5rem" }}
202191
/>
203192
</IconButton>
204193
</Fade>

0 commit comments

Comments
 (0)