parent
5915c72411
commit
b3d9357551
15 changed files with 309 additions and 44 deletions
@ -0,0 +1,21 @@ |
||||
import React, { Component } from 'react'; |
||||
import navbarSearch from "../../../assets/icons/navbarSearch.png"; |
||||
|
||||
import './index.scss'; |
||||
|
||||
const maxDesktopSize = 1250; |
||||
|
||||
const fontSize = { |
||||
desktop: { |
||||
input: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 70, |
||||
}, |
||||
}; |
||||
|
||||
export default function Search(props){ |
||||
return( |
||||
<div className="desktop-chat-search d-flex"> |
||||
<input type="search" style={{ fontSize: fontSize.desktop.input }} placeholder="جستجو" /> |
||||
<img src={navbarSearch} alt="جستجو" /> |
||||
</div> |
||||
); |
||||
} |
@ -0,0 +1,26 @@ |
||||
.desktop-chat-search{ |
||||
width: 100%; |
||||
position: relative; |
||||
margin: 10px 0px; |
||||
img{ |
||||
position: absolute; |
||||
left: 7px; |
||||
top: 6px; |
||||
width: 20px; |
||||
} |
||||
input{ |
||||
width: 100%; |
||||
padding: 5px 10px 5px 35px; |
||||
font-family: numeralMedium; |
||||
border-radius: 5px; |
||||
background-color: #ebebeb; |
||||
color: #6f7074; |
||||
border: 0px; |
||||
&:focus{ |
||||
outline: 0px |
||||
} |
||||
&::placeholder{ |
||||
color: #bfbfbf; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,90 @@ |
||||
import React from 'react'; |
||||
import clsx from 'clsx'; |
||||
import { makeStyles, useTheme } from '@material-ui/core/styles'; |
||||
import Drawer from '@material-ui/core/Drawer'; |
||||
import Info from '../Info/index'; |
||||
|
||||
import './index.scss'; |
||||
|
||||
const drawerWidth = 350; |
||||
|
||||
const useStyles = makeStyles((theme) => ({ |
||||
root: { |
||||
display: 'flex', |
||||
}, |
||||
appBar: { |
||||
transition: theme.transitions.create(['margin', 'width'], { |
||||
easing: theme.transitions.easing.sharp, |
||||
duration: theme.transitions.duration.leavingScreen, |
||||
}), |
||||
}, |
||||
appBarShift: { |
||||
width: `calc(100% - ${drawerWidth}px)`, |
||||
marginLeft: drawerWidth, |
||||
transition: theme.transitions.create(['margin', 'width'], { |
||||
easing: theme.transitions.easing.easeOut, |
||||
duration: theme.transitions.duration.enteringScreen, |
||||
}), |
||||
}, |
||||
menuButton: { |
||||
marginRight: theme.spacing(2), |
||||
}, |
||||
hide: { |
||||
display: 'none', |
||||
}, |
||||
drawer: { |
||||
width: drawerWidth, |
||||
flexShrink: 0, |
||||
}, |
||||
drawerPaper: { |
||||
width: drawerWidth, |
||||
}, |
||||
drawerHeader: { |
||||
display: 'flex', |
||||
alignItems: 'center', |
||||
padding: theme.spacing(0, 1), |
||||
// necessary for content to be below app bar
|
||||
...theme.mixins.toolbar, |
||||
justifyContent: 'flex-end', |
||||
}, |
||||
content: { |
||||
flexGrow: 1, |
||||
padding: theme.spacing(3), |
||||
transition: theme.transitions.create('margin', { |
||||
easing: theme.transitions.easing.sharp, |
||||
duration: theme.transitions.duration.leavingScreen, |
||||
}), |
||||
marginLeft: -drawerWidth, |
||||
}, |
||||
contentShift: { |
||||
transition: theme.transitions.create('margin', { |
||||
easing: theme.transitions.easing.easeOut, |
||||
duration: theme.transitions.duration.enteringScreen, |
||||
}), |
||||
marginLeft: 0, |
||||
}, |
||||
})); |
||||
|
||||
export default function PersistentDrawerLeft(props) { |
||||
const classes = useStyles(); |
||||
const theme = useTheme(); |
||||
|
||||
|
||||
return ( |
||||
<div> |
||||
<React.Fragment key={'left'}> |
||||
<Drawer |
||||
className={classes.drawer} |
||||
variant="permanent" |
||||
anchor="left" |
||||
open={props.open} |
||||
classes={{ |
||||
paper: classes.drawerPaper, |
||||
}} |
||||
> |
||||
<Info /> |
||||
</Drawer> |
||||
</React.Fragment> |
||||
</div> |
||||
); |
||||
} |
@ -0,0 +1,4 @@ |
||||
.MuiDrawer-paper{ |
||||
position: absolute !important; |
||||
|
||||
} |
Loading…
Reference in new issue