Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Fixes ESLint for multiple panes
Browse files Browse the repository at this point in the history
  • Loading branch information
fellmirr committed Dec 9, 2020
1 parent 3159101 commit 4a33fdf
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 177 deletions.
78 changes: 38 additions & 40 deletions src/components/panes/Forms.style.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,51 @@
import styled from 'styled-components'
import { gray18 } from '../../config/colors'
import styled from "styled-components";
import { gray18 } from "../../config/colors";

export const Form = styled.form`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
`;

export const InputFieldWrapper = styled.div`
display: flex;
flex-direction: column;
`
display: flex;
flex-direction: column;
`;

export const TextField = styled.input`
padding: 20px;
display: block;
margin: 5px;
font-size: 15px;
border: 1px solid ${gray18};
border-radius: 5px;
box-sizing: border-box;
`
padding: 20px;
display: block;
margin: 5px;
font-size: 15px;
border: 1px solid ${gray18};
border-radius: 5px;
box-sizing: border-box;
`;

export const CheckBox = styled.input`
margin-left: 10px;
&:hover {
cursor: pointer;
opacity: 0.5;
}
`
margin-left: 10px;
&:hover {
cursor: pointer;
opacity: 0.5;
}
`;

export const RadioWrapper = styled.div`
`
export const RadioWrapper = styled.div``;

export const RadioButton = styled.input`
margin-left: 10px;
&:hover {
cursor: pointer;
}
`
margin-left: 10px;
&:hover {
cursor: pointer;
}
`;

export const InputLabel = styled.p`
align-self: start;
font-size: 12px;
display: inline;
position: relative;
bottom: 2px;
margin-left: 5px;
`
align-self: start;
font-size: 12px;
display: inline;
position: relative;
bottom: 2px;
margin-left: 5px;
`;
24 changes: 12 additions & 12 deletions src/components/panes/PaymentPane/PaymentPane.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import React from 'react'
import { useSelector } from 'react-redux'
import { PaymentMethod, State } from '../../../store/state'
import { ResultPane } from './Bank/ResultPane'
import { PaypalPane } from './Paypal/PayPalPane'
import { VippsPane } from './Vipps/VippsPane'
import React from "react";
import { useSelector } from "react-redux";
import { PaymentMethod, State } from "../../../store/state";
import { ResultPane } from "./Bank/ResultPane";
import { PaypalPane } from "./Paypal/PayPalPane";
import { VippsPane } from "./Vipps/VippsPane";

export const PaymentPane: React.FC = () => {
const method = useSelector((state: State) => state.donation.method)
const method = useSelector((state: State) => state.donation.method);

switch (method) {
case PaymentMethod.BANK:
return <ResultPane />
return <ResultPane />;
case PaymentMethod.PAYPAL:
return <PaypalPane />
return <PaypalPane />;
case PaymentMethod.VIPPS:
return <VippsPane />
return <VippsPane />;
default:
return <div>Invalid payment method</div>
return <div>Invalid payment method</div>;
}
}
};
58 changes: 29 additions & 29 deletions src/components/panes/ReferralPane/ReferralPane.style.tsx
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
import styled from 'styled-components'
import styled from "styled-components";

export const ReferralsWrapper = styled.div`
width: 240px;
white-space: normal;
display: flex;
align-items: space-between;
width: 240px;
flex-wrap: wrap;
`
width: 240px;
white-space: normal;
display: flex;
align-items: space-between;
width: 240px;
flex-wrap: wrap;
`;

export const OtherInputWrapper = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
`;

export const OtherInput = styled.textarea`
margin-top: 10px;
width: 200px;
height: 100px;
padding: 5px;
`
margin-top: 10px;
width: 200px;
height: 100px;
padding: 5px;
`;

export const ReferralButton = styled.button`
width: 110px;
padding: 5px;
margin: 5px;
background: #f8f1e5;
border: 1px solid #dfd2c5;
&:hover {
cursor: pointer;
opacity: 0.5;
}
`
width: 110px;
padding: 5px;
margin: 5px;
background: #f8f1e5;
border: 1px solid #dfd2c5;
&:hover {
cursor: pointer;
opacity: 0.5;
}
`;
75 changes: 37 additions & 38 deletions src/components/panes/SharesPane/SharesPane.style.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,48 @@
import styled from 'styled-components'
import styled from "styled-components";

export const SharesWrapper = styled.div`
display: flex;
flex-direction: column;
`
display: flex;
flex-direction: column;
`;

export const ShareWrapper = styled.div`
text-align: right;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
padding: 0;
height: 40px;
position: relative;
`
text-align: right;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
padding: 0;
height: 40px;
position: relative;
`;

export const SmallTextField = styled.input`
width: 30px;
padding: 8px;
display: inline-block;
margin-left: 5px;
margin-right: 5px;
font-size: 14px;
background: #eee;
border: none;
text-align: center;
width: 30px;
padding: 8px;
display: inline-block;
margin-left: 5px;
margin-right: 5px;
font-size: 14px;
background: #eee;
border: none;
text-align: center;
&:focus::-webkit-input-placeholder {
color: transparent;
}
`
&:focus::-webkit-input-placeholder {
color: transparent;
}
`;

export const OrganizationName = styled.p`
width: 120px;
font-size: 12px;
display: inline-block;
margin-right: 5px;
`
width: 120px;
font-size: 12px;
display: inline-block;
margin-right: 5px;
`;

export const PercentageText = styled.p`
margin: 0;
margin-top: 3px;
color: gray;
font-size: 12px;
text-align: center;
`
margin: 0;
margin-top: 3px;
color: gray;
font-size: 12px;
text-align: center;
`;
Loading

0 comments on commit 4a33fdf

Please sign in to comment.