Skip to content

Commit b67b657

Browse files
committed
Adjust text input size
1 parent 80d1b69 commit b67b657

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

frontend/src/components/QuestionCategoryAutoComplete/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const QuestionCategoryAutoComplete: React.FC<
2626
multiple
2727
freeSolo
2828
options={state.questionCategories}
29-
size="small"
3029
sx={{ marginTop: 2 }}
3130
value={selectedCategories}
3231
onChange={(_e, newCategoriesSelected) => {

frontend/src/pages/NewQuestion/index.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const NewQuestion = () => {
3434
const [title, setTitle] = useState<string>("");
3535
const [markdownText, setMarkdownText] = useState<string>("");
3636
const [selectedComplexity, setselectedComplexity] = useState<string | null>(
37-
null,
37+
null
3838
);
3939
const [selectedCategories, setSelectedCategories] = useState<string[]>([]);
4040
const [uploadedImagesUrl, setUploadedImagesUrl] = useState<string[]>([]);
@@ -49,7 +49,7 @@ const NewQuestion = () => {
4949
) {
5050
if (
5151
!confirm(
52-
"Are you sure you want to leave this page? All process will be lost.",
52+
"Are you sure you want to leave this page? All process will be lost."
5353
)
5454
) {
5555
return;
@@ -76,7 +76,7 @@ const NewQuestion = () => {
7676
complexity: selectedComplexity,
7777
categories: selectedCategories,
7878
},
79-
dispatch,
79+
dispatch
8080
);
8181

8282
if (result) {
@@ -105,7 +105,6 @@ const NewQuestion = () => {
105105
<TextField
106106
label="Title"
107107
variant="outlined"
108-
size="small"
109108
fullWidth
110109
autoComplete="off"
111110
value={title}
@@ -115,7 +114,6 @@ const NewQuestion = () => {
115114

116115
<Autocomplete
117116
options={complexityList}
118-
size="small"
119117
sx={{ marginTop: 2 }}
120118
onChange={(_e, newcomplexitySelected) => {
121119
setselectedComplexity(newcomplexitySelected);

frontend/src/pages/QuestionEdit/index.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const QuestionEdit = () => {
3737
const [title, setTitle] = useState<string>("");
3838
const [markdownText, setMarkdownText] = useState<string>("");
3939
const [selectedComplexity, setselectedComplexity] = useState<string | null>(
40-
null,
40+
null
4141
);
4242
const [selectedCategories, setSelectedCategories] = useState<string[]>([]);
4343
const [uploadedImagesUrl, setUploadedImagesUrl] = useState<string[]>([]);
@@ -63,7 +63,7 @@ const QuestionEdit = () => {
6363
const handleBack = () => {
6464
if (
6565
!confirm(
66-
"Are you sure you want to leave this page? All process will be lost.",
66+
"Are you sure you want to leave this page? All process will be lost."
6767
)
6868
) {
6969
return;
@@ -104,7 +104,7 @@ const QuestionEdit = () => {
104104
complexity: selectedComplexity,
105105
categories: selectedCategories,
106106
},
107-
dispatch,
107+
dispatch
108108
);
109109

110110
if (result) {
@@ -133,7 +133,6 @@ const QuestionEdit = () => {
133133
<TextField
134134
label="Title"
135135
variant="outlined"
136-
size="small"
137136
fullWidth
138137
autoComplete="off"
139138
value={title}
@@ -143,7 +142,6 @@ const QuestionEdit = () => {
143142

144143
<Autocomplete
145144
options={complexityList}
146-
size="small"
147145
sx={{ marginTop: 2 }}
148146
value={selectedComplexity}
149147
onChange={(_e, newcomplexitySelected) => {

frontend/src/theme.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const theme = createTheme({
2626
},
2727
},
2828
},
29+
MuiTextField: { defaultProps: { size: "small" } },
30+
MuiAutocomplete: { defaultProps: { size: "small" } },
2931
MuiCssBaseline: {
3032
styleOverrides: {
3133
html: {

frontend/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ import svgr from "vite-plugin-svgr";
55
// https://vitejs.dev/config/
66
export default defineConfig({
77
plugins: [react(), svgr()],
8+
optimizeDeps: { include: ["@mui/material", "@mui/icons-material"] },
89
});

0 commit comments

Comments
 (0)