Skip to content
Merged
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
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {BrowserRouter, Redirect, useHistory} from "react-router-dom";
import './theme/main.scss'
import Splash from "./pages/Splash";
import SignIn from "./pages/SignIn";
import SignUp from "./pages/SignUp";


interface StateProps {
Expand All @@ -33,6 +34,7 @@ const ReactApp: React.FC<AppProps> = ({tokenData}) => {
<AuthenticatedRoute path="/home*" render={() => <Home/>}/>
<Route exact path='/splash'><Splash/></Route>
<Route exact path='/sign-in'><SignIn/></Route>
<Route exact path='/sign-up'><SignUp/></Route>
<Route exact path='/'><Redirect to={'/splash'}/></Route>
</main>
</BrowserRouter>
Expand Down
2 changes: 1 addition & 1 deletion src/components/BottomStickySection/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
padding: 6px;
margin: 0;
}
ion-button {
button {
margin: 0;
}
}
2 changes: 1 addition & 1 deletion src/components/Errors/NetworkError/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
height: 70%;
text-align: center;
padding: 0 10%;
ion-icon {
img {
display: block;
margin: 0 auto;
font-size: 96px;
Expand Down
6 changes: 2 additions & 4 deletions src/components/GeneralUIElements/BorderedInput/index.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.bordered-input {
margin: 0 0 12px;
ion-datetime,
ion-textarea,
ion-input {
input, textarea {
--padding-start: 12px;
border: 2px var(--ion-color-primary) solid;
border: 2px var(--color-primary) solid;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
color: black;
}
h3 {
color: var(--ion-color-medium);
color: var(--color-medium);
font-weight: bold;
}
hr {
background: var(--ion-color-light-shade);
background: var(--color-light-shade);
height: 1px;
max-width: 35vw;
margin: 0 auto;
Expand Down
5 changes: 2 additions & 3 deletions src/components/GeneralUIElements/GrayInput/index.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
.gray-input {
ion-datetime,
ion-input {
input {
--padding-start: 3.125vw;
border: transparent;
background: var(--ion-color-light);
background: var(--color-light);
border-radius: 10px;
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/GeneralUIElements/GrayInput/responsive.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.gray-input {
ion-datetime,
ion-input {
input {
@media screen and (min-width: 576px) {
--padding-start: 18px;
}
Expand Down
8 changes: 3 additions & 5 deletions src/components/GeneralUIElements/UnderlinedInput/index.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
.underlined-input {
ion-datetime,
ion-textarea,
ion-input {
input {
--padding-start: 10px;
border: transparent;
border-bottom: 3px var(--ion-color-medium) solid;
border-bottom: 3px var(--color-medium) solid;
}
ion-label {
label {
font-weight: 600;
}
}
35 changes: 35 additions & 0 deletions src/components/InputWrapper/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.input-wrapper {
margin: 8vw 0 5vw;
&.rounded{
input{
border-radius: 5px;
}
}
&.dark{
input{
border-color: var(--color-dark);
}
}
label {
padding-left: 5px;
padding-bottom: 4px;
margin-bottom: 0;
display: block;
}
input {
border: 1px var(--color-primary) solid;
--padding-start: 3.125vw;
}
.subtext {
padding-top: 5px;
padding-left: 5px;
}
}
.plt-android {
.input-wrapper {
label {
padding-bottom: 3.5vw;
}
}
}
@import "responsive";
8 changes: 8 additions & 0 deletions src/components/InputWrapper/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import { render } from '@testing-library/react';
import Input from './index';

test('renders Input without crashing', () => {
const { baseElement } = render(<Input label={'A Label'}/>);
expect(baseElement).toBeDefined();
});
23 changes: 23 additions & 0 deletions src/components/InputWrapper/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React, {PropsWithChildren} from 'react'
import './index.scss';

interface Props extends PropsWithChildren<any> {
label: string
subtext?: string
error?: string
color?: string
rounded?: boolean
}

const InputWrapper: React.FC<Props> = ({ label, error, color, rounded, subtext, children }) => {
const wrapperClasses = (color ? ' ' + color : '') + (rounded ? ' rounded' : '')
return (
<div className={'input-wrapper' + wrapperClasses}>
<label color={error ? 'danger' : 'dark'}>{error ? error : label}</label>
{children}
{subtext && <p className={'subtext'}>{subtext}</p>}
</div>
)
}

export default InputWrapper
19 changes: 19 additions & 0 deletions src/components/InputWrapper/responsive.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.input-wrapper {
@media screen and (min-width: 600px) {
margin: 48px 0 30px;
}
input {
@media screen and (min-width: 576px) {
--padding-start: 18px;
}
}
}
.plt-android {
.input-wrapper {
label {
@media screen and (min-width: 600px) {
padding-bottom: 21px;
}
}
}
}
8 changes: 0 additions & 8 deletions src/pages/Home/Post/index.scss

This file was deleted.

9 changes: 0 additions & 9 deletions src/pages/Home/Post/index.test.tsx

This file was deleted.

114 changes: 0 additions & 114 deletions src/pages/Home/Post/index.tsx

This file was deleted.

23 changes: 1 addition & 22 deletions src/pages/Home/index.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
.home-splitpane {
max-width: 1024px;
margin: 0 auto;
--ion-safe-area-bottom: 15px;
.home-tabs-content.ion-page-hidden {
display: flex !important;
}
.home-tabs {
--border: 0;
padding: 1vw;
margin-bottom: var(--ion-safe-area-bottom);
.profile-image {
width: 8vw;
height: 8vw;
}
ion-icon {
font-size: 7.5vw;
&.primary-tab{
--color: var(--ion-color-primary);
}
}
}
#home-page {
}

@import "./responsive";
4 changes: 2 additions & 2 deletions src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ interface HomeProps {
const Home: React.FC<HomeProps> = (props) => {

return (
<div>
<section id={"home-page"}>
<h1>Home Page</h1>
</div>
</section>
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/Home/responsive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
height: 40px;
}

ion-icon {
.icon {
font-size: 38px;
}
}
Expand Down
26 changes: 0 additions & 26 deletions src/pages/Home/route-helpers.tsx

This file was deleted.

Loading