Skip to content
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: add login screen with black google login button #5

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

html {
font-size: 62.5%;
font-family: 'Inter', sans-serif;
}
1 change: 1 addition & 0 deletions public/google-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 13 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
const App = () => {
return <h1>Univent Planner</h1>
import React from 'react';
import { CssBaseline } from '@mui/material';
import LoginScreen from './screens/LoginScreen/LoginScreen';


const App: React.FC = () => {
return (
<>
<CssBaseline />
<LoginScreen />
</>
);
};

export default App;
export default App;
21 changes: 21 additions & 0 deletions src/screens/LoginScreen/LoginScreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import { Container, Logo, GoogleButton } from './LoginScreenStyles';

const LoginScreen: React.FC = () => {
return (
<Container>
<Logo src="univent_logo.svg" alt="Unievent Planner" />
<GoogleButton
variant="contained"
startIcon={<img src="./google-logo.svg" alt="Google" />}
onClick={() => {
/* tutaj Google login */
}}
>
Zaloguj się z Google
</GoogleButton>
</Container>
);
};

export default LoginScreen;
42 changes: 42 additions & 0 deletions src/screens/LoginScreen/LoginScreenStyles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { Box, Button } from '@mui/material';
import { styled } from '@mui/system';

export const Container = styled(Box)`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
background-color: #ffffff;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kolory trzeba importować z pliku theme znajdziesz go na nowym developie każdy może tam dodawać nowe w razie potrzeby.

`;

export const Logo = styled('img')`
width: 18rem;
height: 18rem;
margin-bottom: 4rem;
`;

export const GoogleButton = styled(Button)`
background-color: #313334;
color: #ffffff;
font-family: 'Inter', sans-serif;
font-size: 1.25rem;
text-align: center;
text-transform: none;
padding: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
width: 22rem;
height: 4rem;
border-radius: 0.6rem;

&:hover {
background-color: #1f2021;
}
img {
width: 2rem;
height: 2rem;
margin-right: 0.5rem;
}
`;