feature: add default boxBorderRadius theme prop

This commit is contained in:
George Lima 2018-12-20 11:09:10 -03:00
parent 4c139dae05
commit a8b2fadcae
6 changed files with 14 additions and 12 deletions

View File

@ -16,7 +16,7 @@ const MenuWrapper = styled.div`
props.theme.colors.activeItem,
)}, ${props.theme.colors.activeItem})`};
padding: 10px 20px;
border-radius: 10px;
border-radius: ${props => props.theme.boxBorderRadius};
margin-left: -10px;
`;

View File

@ -4,7 +4,8 @@ import React from 'react';
import styled from 'styled-components';
const getDefaultStyles = t => styled[t]`
border-radius: 6px;
border-radius: ${// $FlowFixMe
props => props.theme.boxBorderRadius};
border: none;
background-color: ${// $FlowFixMe
props => props.theme.colors.inputBackground};

View File

@ -9,7 +9,7 @@ import ChevronDown from '../assets/images/chevron-down.svg';
const SelectWrapper = styled.div`
display: flex;
flex-direction: row;
border-radius: 6px;
border-radius: ${props => props.theme.boxBorderRadius};
border: none;
background-color: ${// $FlowFixMe
props => props.theme.colors.inputBackground};

View File

@ -1,15 +1,19 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import { TransactionItemComponent, type Transaction } from './transaction-item';
import { TextComponent } from './text';
import { Divider } from './divider';
import theme from '../theme';
const Wrapper = styled.div`
margin-top: 20px;
`;
const TransactionsWrapper = styled.div`
border-radius: 7.5px;
border-radius: ${props => props.theme.boxBorderRadius};
overflow: hidden;
background-color: ${props => props.theme.colors.cardBackgroundColor};
padding: 0;
@ -26,12 +30,6 @@ const Day = styled(TextComponent)`
margin-bottom: 5px;
`;
const Divider = styled.div`
width: 100%;
height: 1px;
background-color: ${props => props.theme.colors.inactiveItem};
`;
type Props = {
transactionsDate: string,
transactions: Transaction[],
@ -57,7 +55,9 @@ export const TransactionDailyComponent = ({
amount={amount}
zecPrice={zecPrice}
/>
{idx < transactions.length - 1 && <Divider />}
{idx < transactions.length - 1 && (
<Divider color={theme.colors.inactiveItem} />
)}
</div>
))}
</TransactionsWrapper>

View File

@ -15,7 +15,7 @@ const Wrapper = styled.div`
display: flex;
flex-direction: column;
background-color: ${props => props.theme.colors.cardBackgroundColor};
border-radius: 5px;
border-radius: ${props => props.theme.boxBorderRadius};
padding: 37px 45px;
position: relative;
margin-top: ${props => props.theme.layoutContentPaddingTop};

View File

@ -70,6 +70,7 @@ const appTheme = {
layoutPaddingLeft: '50px',
layoutPaddingRight: '45px',
layoutContentPaddingTop: '20px',
boxBorderRadius: '6px',
};
export const GlobalStyle = createGlobalStyle`