Skip to content

Commit

Permalink
[TreeView] Make the search textbox more visible
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Jul 5, 2024
1 parent 457eafe commit 7e8cc83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"descriptionP4": "Sign up to get started with your word collection!"
},
"treeView": {
"findDomain": "Find a domain",
"findDomain": "Find a domain:",
"domainNotFound": "Domain not found",
"returnToTop": "Return to the top of the domain tree."
},
Expand Down
14 changes: 9 additions & 5 deletions src/components/TreeView/TreeSearch.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Grid, TextField } from "@mui/material";
import { Stack, TextField, Typography } from "@mui/material";
import {
type ChangeEvent,
type KeyboardEvent,
Expand Down Expand Up @@ -41,12 +41,16 @@ export default function TreeSearch(props: TreeSearchProps): ReactElement {
};

return (
<Grid style={{ maxWidth: 200 }}>
<Stack
alignItems="center"
direction="row"
gap={1}
style={{ maxWidth: 300 }}
>
<Typography>{t("treeView.findDomain")}</Typography>
<TextField
variant="standard"
fullWidth
id="domain-tree-search-field"
label={t("treeView.findDomain")}
onKeyDown={stopPropagation}
onChange={handleChange}
onKeyUp={handleOnKeyUp}
Expand All @@ -57,7 +61,7 @@ export default function TreeSearch(props: TreeSearchProps): ReactElement {
error={searchError}
helperText={searchError ? t("treeView.domainNotFound") : undefined}
/>
</Grid>
</Stack>
);
}

Expand Down

0 comments on commit 7e8cc83

Please sign in to comment.