Skip to content

Commit b26a349

Browse files
committed
working on create session scene
1 parent fe0d637 commit b26a349

3 files changed

Lines changed: 64 additions & 15 deletions

File tree

‎front/src/common-app/components/appbar/appbar.styles.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ const { palette, typography, spacing } = theme;
55
export const appbarContainer = css`
66
width: 100%;
77
height: ${spacing(80)};
8-
background-image: linear-gradient(60deg, red 19%, yellow 19%, white 80%);
8+
background-image: linear-gradient(60deg, #2098d1 19%, #d9d900 19%, #eee 80%);
99
`;

‎front/src/pods/create-session/create-session.component.tsx‎

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,38 @@ import React from 'react';
22
import * as classes from './create-session.styles';
33
// Material UI ~ components
44
import Button from '@material-ui/core/Button';
5+
import Typography from '@material-ui/core/Typography';
6+
import ArrowRightAltIcon from '@material-ui/icons/ArrowRightAlt';
57

68
interface Props {
79
handleCreateSession: () => void;
810
}
911

1012
export const CreateSessionComponent: React.FunctionComponent<Props> = props => {
1113
const { handleCreateSession } = props;
12-
const { mainContainer, createSessionBtn } = classes;
14+
const {
15+
mainContainer,
16+
buttonContainer,
17+
descriptionText,
18+
createSessionBtn,
19+
arrowIcon,
20+
} = classes;
1321

1422
return (
1523
<>
1624
<main className={mainContainer}>
17-
<Button
18-
variant="contained"
19-
color="primary"
20-
onClick={() => handleCreateSession()}
21-
className={createSessionBtn}
22-
>
23-
Create Session
24-
</Button>
25+
<div className={buttonContainer}>
26+
<Typography variant="body1" className={descriptionText}>
27+
The best tool for sharing code with anyone!
28+
</Typography>
29+
<button
30+
onClick={() => handleCreateSession()}
31+
className={createSessionBtn}
32+
>
33+
Create Session
34+
<ArrowRightAltIcon className={arrowIcon} />
35+
</button>
36+
</div>
2537
</main>
2638
</>
2739
);

‎front/src/pods/create-session/create-session.styles.ts‎

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,54 @@ import { theme } from 'core/theme';
33
const { spacing } = theme;
44

55
export const mainContainer = css`
6+
background-color: white;
67
position: relative;
78
margin: 0;
89
padding: 0;
910
width: 100%;
10-
height: calc(100vh - ${spacing(16)});
11+
height: calc(100vh - ${spacing(80)});
1112
`;
1213

13-
export const createSessionBtn = css`
14-
padding: ${spacing(20)} ${spacing(30)};
14+
export const buttonContainer = css`
15+
width: 25rem;
1516
position: absolute;
17+
display: flex;
18+
flex-direction: column;
19+
align-items: center;
20+
margin-left: 15%;
1621
top: 50%;
17-
left: 50%;
18-
transform: translate(-50%, -50%);
22+
transform: translateY(-50%);
23+
`;
24+
25+
export const descriptionText = css`
26+
text-align: center;
27+
font-size: 1.8rem;
28+
font-weight: 400;
29+
`;
30+
31+
export const createSessionBtn = css`
32+
display: flex;
33+
align-items: center;
34+
color: #2098d1;
35+
padding: ${spacing(20)} ${spacing(30)};
36+
text-transform: capitalize;
37+
margin-top: 2rem;
38+
font-size: 1.4rem;
39+
font-weight: 400;
40+
background: linear-gradient(to right, #2098d1, #2098d1);
41+
background-repeat: no-repeat;
42+
background-size: 0 100%;
43+
transition: all 0.4s 0s;
44+
border: 2px solid #2098d1;
45+
border-radius: 1rem;
46+
&:hover {
47+
cursor: pointer;
48+
background-size: 100% 100%;
49+
color: white;
50+
}
51+
`;
52+
53+
export const arrowIcon = css`
54+
margin-left: 0.8rem;
55+
font-size: 2rem;
1956
`;

0 commit comments

Comments
 (0)