tried to add search icon
This commit is contained in:
parent
bc64499b89
commit
b8e673646e
@ -3,7 +3,7 @@ import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
|||||||
import CheckENVRoute from "./CheckENVRoute";
|
import CheckENVRoute from "./CheckENVRoute";
|
||||||
import Home from "./components/home/Home";
|
import Home from "./components/home/Home";
|
||||||
import Login from "./components/Login";
|
import Login from "./components/Login";
|
||||||
import NotFound from "./components/NotFound";
|
import NotFound from "./components/UtilityComponents/NotFound";
|
||||||
import RepositoryInfo from "./components/repositoryInfo/RepositoryInfo";
|
import RepositoryInfo from "./components/repositoryInfo/RepositoryInfo";
|
||||||
import ProtectedRoute from "./ProtectedRoute";
|
import ProtectedRoute from "./ProtectedRoute";
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Outlet } from "react-router-dom";
|
import { Outlet } from "react-router-dom";
|
||||||
import ErrorENV from "./components/ErrorENV"
|
import ErrorENV from "./components/UtilityComponents/ErrorENV"
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const CheckENVRoute: React.FC = () => {
|
const CheckENVRoute: React.FC = () => {
|
||||||
|
|||||||
28
src/components/UtilityComponents/IconTextField.tsx
Normal file
28
src/components/UtilityComponents/IconTextField.tsx
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { TextField, InputAdornment } from "@mui/material";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
iconStart: React.ReactNode;
|
||||||
|
iconEnd: React.ReactNode;
|
||||||
|
others: any[]
|
||||||
|
}
|
||||||
|
|
||||||
|
const IconTextField: React.FC<Props> = (props) => {
|
||||||
|
// cosnt { iconStart, iconEnd, ...others } = props;
|
||||||
|
return (
|
||||||
|
<TextField
|
||||||
|
// {...props}
|
||||||
|
// InputProps={{
|
||||||
|
// ...InputProps,
|
||||||
|
// startAdornment: iconStart ? (
|
||||||
|
// <InputAdornment position="start">{iconStart}</InputAdornment>
|
||||||
|
// ) : null,
|
||||||
|
// endAdornment: iconEnd ? (
|
||||||
|
// <InputAdornment position="end">{iconEnd}</InputAdornment>
|
||||||
|
// ) : null
|
||||||
|
// }}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default IconTextField;
|
||||||
@ -3,7 +3,7 @@ import { List } from "@mui/material";
|
|||||||
import RepositoryItem from "./RepositoryEntry";
|
import RepositoryItem from "./RepositoryEntry";
|
||||||
import useRepositories from "../../hooks/useRepositories";
|
import useRepositories from "../../hooks/useRepositories";
|
||||||
import Repository from "../../interfaces/Repositoriy";
|
import Repository from "../../interfaces/Repositoriy";
|
||||||
import Loading from "../Loading";
|
import Loading from "../UtilityComponents/Loading";
|
||||||
|
|
||||||
const Home: React.FC = () => {
|
const Home: React.FC = () => {
|
||||||
const { isFetched, repositories } = useRepositories();
|
const { isFetched, repositories } = useRepositories();
|
||||||
|
|||||||
@ -1,15 +1,38 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { useLocation, Link } from "react-router-dom";
|
import { useLocation, Link } from "react-router-dom";
|
||||||
import { ListItemButton, Button, Box, Card, CardContent, Typography, CardActions, Grid, List, ListItemText, Snackbar, Alert, Tooltip, Collapse, FormGroup, FormControlLabel, Checkbox } from "@mui/material";
|
import {
|
||||||
|
ListItemButton,
|
||||||
|
Button,
|
||||||
|
Box,
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
Typography,
|
||||||
|
CardActions,
|
||||||
|
Grid,
|
||||||
|
List,
|
||||||
|
ListItemText,
|
||||||
|
Snackbar,
|
||||||
|
Alert,
|
||||||
|
Tooltip,
|
||||||
|
Collapse,
|
||||||
|
FormGroup,
|
||||||
|
FormControlLabel,
|
||||||
|
Checkbox,
|
||||||
|
FormControl,
|
||||||
|
InputLabel,
|
||||||
|
Select,
|
||||||
|
MenuItem,
|
||||||
|
TextField
|
||||||
|
} from "@mui/material";
|
||||||
import AccessTimeIcon from '@mui/icons-material/AccessTime';
|
import AccessTimeIcon from '@mui/icons-material/AccessTime';
|
||||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
||||||
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
|
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
|
||||||
|
import SearchIcon from '@mui/icons-material/Search';
|
||||||
import useRepositories from "../../hooks/useRepositories";
|
import useRepositories from "../../hooks/useRepositories";
|
||||||
import Tag from "../../interfaces/Tag";
|
import Tag from "../../interfaces/Tag";
|
||||||
import Repository from "../../interfaces/Repositoriy";
|
|
||||||
import { getHostNameFromURL, printSize, printTimePassed, PrintOSIcon, toUpperFirst, printMonth } from "../../utils";
|
import { getHostNameFromURL, printSize, printTimePassed, PrintOSIcon, toUpperFirst, printMonth } from "../../utils";
|
||||||
import RepoNotFound from "./RepoNotFound"
|
import RepoNotFound from "./RepoNotFound"
|
||||||
import Loading from "../Loading";
|
import Loading from "../UtilityComponents/Loading";
|
||||||
import { digestDisplay } from "../../interfaces/Utils";
|
import { digestDisplay } from "../../interfaces/Utils";
|
||||||
|
|
||||||
const RepositoryInfo: React.FC = () => {
|
const RepositoryInfo: React.FC = () => {
|
||||||
@ -57,6 +80,10 @@ const RepositoryInfo: React.FC = () => {
|
|||||||
setShowDetails((prev) => !prev);
|
setShowDetails((prev) => !prev);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSortTags = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return (isFetched ? (
|
return (isFetched ? (
|
||||||
repository ? (
|
repository ? (
|
||||||
<div className="repositoryInfo">
|
<div className="repositoryInfo">
|
||||||
@ -198,16 +225,29 @@ const RepositoryInfo: React.FC = () => {
|
|||||||
<div className="wrapperCollapsed">
|
<div className="wrapperCollapsed">
|
||||||
<Card className="tagSearchCard" variant="outlined">
|
<Card className="tagSearchCard" variant="outlined">
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<Grid container>
|
<Grid container style={{display:'flex', justifyContent:'space-between'}}>
|
||||||
<Grid item md={4}>
|
<Grid item md={2}>
|
||||||
<Typography className="lines" variant="h5" component="div" color="#94a1aa">
|
<FormControl fullWidth>
|
||||||
Sort
|
<InputLabel id="tag-sort-label">Sort By </InputLabel>
|
||||||
</Typography>
|
<Select
|
||||||
|
labelId="tag-sort-label"
|
||||||
|
id="tag-sort-select"
|
||||||
|
value="Newest"
|
||||||
|
label="Sort By"
|
||||||
|
onChange={handleSortTags}
|
||||||
|
>
|
||||||
|
<MenuItem value="Newest">Newest</MenuItem>
|
||||||
|
<MenuItem value="Oldest">Oldest</MenuItem>
|
||||||
|
<MenuItem value="A-Z">A-Z"</MenuItem>
|
||||||
|
<MenuItem value="Z-A">Z-A</MenuItem>
|
||||||
|
</Select>
|
||||||
|
</FormControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item md={8}>
|
<Grid item md={6}>
|
||||||
<Typography className="lines" variant="h5" component="div" color="#94a1aa">
|
<TextField id="outlined-search-tags" label="Search" variant="outlined" style={{display:'flex', justifyContent:'space-between'}} />
|
||||||
Search
|
</Grid>
|
||||||
</Typography>
|
<Grid item md={2} style={{display:'flex', justifyContent:'flex-end'}}>
|
||||||
|
<Button>Delete</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user