-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Manage users component #4
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
import React from 'react'; | ||
import { CssBaseline } from '@mui/material'; | ||
import { ManageUsers } from './manageUsers/manageUsers'; | ||
const App = () => { | ||
return <h1>Univent Planner</h1> | ||
return ( | ||
<> | ||
<CssBaseline /> | ||
<ManageUsers /> | ||
</> | ||
); | ||
}; | ||
|
||
export default App; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import * as React from 'react'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. moduły powinny być umieszczone w src/screens/{nazwa modułu} będziesz musiał przenieść manageUseres |
||
import List from '@mui/material/List'; | ||
import ListItemAvatar from '@mui/material/ListItemAvatar'; | ||
import ListItemText from '@mui/material/ListItemText'; | ||
import Avatar from '@mui/material/Avatar'; | ||
import Typography from '@mui/material/Typography'; | ||
import ArrowBackIcon from '@mui/icons-material/ArrowBack'; | ||
import GroupRemoveIcon from '@mui/icons-material/GroupRemove'; | ||
import { BackButton, Item, RemoveButton, Wrapper } from './manageUsersStyle'; | ||
|
||
export const ManageUsers = () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. exportuj na końcu pliku przy użyciu export default ManageUsers |
||
function generate(element: React.ReactElement) { | ||
return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((value) => | ||
React.cloneElement(element, { | ||
key: value, | ||
}) | ||
); | ||
} | ||
const [secondary, setSecondary] = React.useState(false); | ||
return ( | ||
<Wrapper> | ||
<BackButton> | ||
<ArrowBackIcon></ArrowBackIcon> | ||
</BackButton> | ||
<Typography sx={{ mt: 8, mb: 2, ml: 1 }} variant="h6" component="div"> | ||
Członkowie | ||
<Typography | ||
variant="h6" | ||
component="div" | ||
fontStyle={'italic'} | ||
fontWeight={600} | ||
> | ||
NAZWA_GRUPY | ||
</Typography> | ||
</Typography> | ||
<List> | ||
{generate( | ||
<Item | ||
secondaryAction={ | ||
<RemoveButton edge="end" aria-label="delete"> | ||
<GroupRemoveIcon /> | ||
</RemoveButton> | ||
} | ||
> | ||
<ListItemAvatar> | ||
<Avatar src={''}></Avatar> | ||
</ListItemAvatar> | ||
<ListItemText | ||
primary="Użytkownik" | ||
secondary={secondary ? 'Secondary text' : null} | ||
/> | ||
</Item> | ||
)} | ||
</List> | ||
</Wrapper> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { styled } from '@mui/material'; | ||
import { ListItem, IconButton, Box } from '@mui/material'; | ||
|
||
export const Wrapper = styled(Box)` | ||
display: flex; | ||
flex-direction: column; | ||
height: 100vh; | ||
padding: 32px; | ||
box-sizing: border-box; | ||
position: relative; | ||
@media (max-width: 600px) { | ||
padding: 16px; | ||
} | ||
`; | ||
export const Content = styled(Box)` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
flex: 1; | ||
width: 100%; | ||
padding: 16px; | ||
@media (max-width: 600px) { | ||
padding: 8px; | ||
} | ||
`; | ||
|
||
export const BackButton = styled(IconButton)`\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. \ i tab do usunięcia. Po rebasie na nowego developa prettier powinien to naprawić, sprawdź od razu inne pliki. |
||
position: absolute; | ||
border-radius: 9999px; | ||
border: 2px solid #bbbbbb; | ||
@media { | ||
color: black; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. każdy kolor musi być importowane z pliku theme. Możesz go znaleźć na nowym developie. w razie potrzeby możesz do niego dopisać nowe kolory |
||
} | ||
`; | ||
export const RemoveButton = styled(IconButton)` | ||
position: relative; | ||
`; | ||
|
||
export const Item = styled(ListItem)` | ||
position absolute; | ||
background-color: #ffcccc; | ||
border-radius: 12px; | ||
margin-bottom: 8px; | ||
`; | ||
|
||
export const BackButtonWrapper = styled(Box)` | ||
display: flex; | ||
justify-content: flex-start; | ||
background-color: #; | ||
`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ManageUsers do usunięcia z app.tsx