Skip to content

Commit

Permalink
feat: JoinGroupScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinapp1 committed Sep 11, 2024
1 parent 09d768b commit d33c15f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 11 deletions.
13 changes: 13 additions & 0 deletions src/assets/styles/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { DefaultTheme } from 'styled-components';

export const theme: DefaultTheme = {
colors: {
border_grey: '#D9D9D9',
button_red: '#F13D42',
light_grey: '#BBBBBB',
underline_grey: '#797979',
black_100: '#000000',
},
};


6 changes: 5 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { theme } from './assets/styles/theme';
import { ThemeProvider } from 'styled-components';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
</React.StrictMode>
);
8 changes: 4 additions & 4 deletions src/screens/JoinGroupScreen/JoinGroupScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Typography } from '@mui/material';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import { Wrapper, Content, GroupCodeInput, GroupCodeField, JoinButton, CreateGroupButton, BackButton, SvgContainer, Logo } from './JoinGroupScreenStyles';
import { Wrapper, Content, GroupCodeInput, GroupCodeField, JoinButton, CreateGroupButton, BackButton, SvgContainer, Logo, StyledTypography } from './JoinGroupScreenStyles';

const JoinGroup = () => {
return (
Expand All @@ -25,11 +25,11 @@ const JoinGroup = () => {
<GroupCodeField inputProps={{ maxLength: 1 }} />
<GroupCodeField inputProps={{ maxLength: 1 }} />
</GroupCodeInput>
<Typography variant="body1" display="block" sx={{ color: '#BBBBBB', marginLeft: 'auto', marginRight: '0' }} gutterBottom>
<StyledTypography variant="body1" gutterBottom>
Czym jest kod grupy?
</Typography>
</StyledTypography>
<JoinButton variant="contained">Dołącz do grupy</JoinButton>
<Typography variant="body1" sx={{ color: "#BBBBBB" }}>lub</Typography>
<StyledTypography variant="body1" >lub</StyledTypography>
<CreateGroupButton variant="outlined">Utwórz grupę</CreateGroupButton>
</Content>
</Wrapper>
Expand Down
21 changes: 15 additions & 6 deletions src/screens/JoinGroupScreen/JoinGroupScreenStyles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Box, Button, IconButton, Input } from '@mui/material';
import { styled } from '@mui/system';
import { Box, Button, IconButton, Input, Typography } from '@mui/material';
import {styled }from 'styled-components';



export const Wrapper = styled(Box)`
display: flex;
Expand Down Expand Up @@ -50,7 +52,7 @@ export const GroupCodeField = styled(Input)`
&::after {
border-bottom: none !important;
}
border-bottom: 2px solid #000;
border-bottom: 2px solid ${({ theme }) => theme.colors.underline_grey};
@media (max-width: 600px) {
width: 40px;
height: 40px;
Expand All @@ -62,10 +64,10 @@ export const GroupCodeField = styled(Input)`
`;

export const JoinButton = styled(Button)`
background-color: #ff3b30;
background-color: ${({ theme }) => theme.colors.button_red} !important;
color: white;
&:hover {
background-color: #e6392e;
background-color: ${({ theme }) => theme.colors.button_red} !important;
}
margin: 55px 0 15px;
padding: 16px 0;
Expand All @@ -80,9 +82,10 @@ export const JoinButton = styled(Button)`
`;

export const CreateGroupButton = styled(Button)`
border: 1px solid #c4c4c4;
border: 1px solid ${({ theme }) => theme.colors.border_grey} !important;
padding: 16px 0;
font-size: 18px;
color: ${({ theme }) => theme.colors.black_100} !important;
border-radius: 8px;
width: 100%;
color: black;
Expand Down Expand Up @@ -123,3 +126,9 @@ export const Logo = styled('img')`
margin-bottom: 8px;
}
`;

export const StyledTypography = styled(Typography)`
color: ${({ theme }) => theme.colors.light_grey};
margin-left: auto;
margin-right: 0;
`;
13 changes: 13 additions & 0 deletions src/types/style.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'styled-components';

declare module 'styled-components' {
export interface DefaultTheme {
colors: {
border_grey: string;
button_red: string;
light_grey: string;
underline_grey: string;
black_100: string;
};
}
}

0 comments on commit d33c15f

Please sign in to comment.