aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/button.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-20 00:18:43 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-20 00:19:37 +0800
commit6f2217570f0dd7060cf208da32b18c52c9798871 (patch)
tree0bd34b345ef58cc6156f700b93b44cd5f32ea420 /packages/website/ts/components/ui/button.tsx
parent91ca80b248ac75b0d8258dd4dfc7a6e0c36c572b (diff)
parent669ea191a5e34ec704851377ee5eedb03c2d1538 (diff)
downloaddexon-0x-contracts-6f2217570f0dd7060cf208da32b18c52c9798871.tar.gz
dexon-0x-contracts-6f2217570f0dd7060cf208da32b18c52c9798871.tar.zst
dexon-0x-contracts-6f2217570f0dd7060cf208da32b18c52c9798871.zip
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/instant/discharge
Diffstat (limited to 'packages/website/ts/components/ui/button.tsx')
-rw-r--r--packages/website/ts/components/ui/button.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/website/ts/components/ui/button.tsx b/packages/website/ts/components/ui/button.tsx
index 75ba7bcff..92f927843 100644
--- a/packages/website/ts/components/ui/button.tsx
+++ b/packages/website/ts/components/ui/button.tsx
@@ -1,4 +1,4 @@
-import { colors } from '@0xproject/react-shared';
+import { colors } from '@0x/react-shared';
import { darken, saturate } from 'polished';
import * as React from 'react';
import { styled } from 'ts/style/theme';
@@ -10,11 +10,13 @@ export interface ButtonProps {
fontFamily?: string;
backgroundColor?: string;
borderColor?: string;
+ borderRadius?: string;
width?: string;
padding?: string;
type?: string;
isDisabled?: boolean;
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
+ textAlign?: string;
}
const PlainButton: React.StatelessComponent<ButtonProps> = ({ children, isDisabled, onClick, type, className }) => (
@@ -29,11 +31,12 @@ export const Button = styled(PlainButton)`
color: ${props => props.fontColor};
transition: background-color, opacity 0.5s ease;
padding: ${props => props.padding};
- border-radius: 6px;
+ border-radius: ${props => props.borderRadius};
font-weight: 500;
outline: none;
font-family: ${props => props.fontFamily};
width: ${props => props.width};
+ text-align: ${props => props.textAlign};
background-color: ${props => props.backgroundColor};
border: ${props => (props.borderColor ? `1px solid ${props.borderColor}` : 'none')};
&:hover {
@@ -52,11 +55,13 @@ export const Button = styled(PlainButton)`
Button.defaultProps = {
fontSize: '12px',
+ borderRadius: '6px',
backgroundColor: colors.white,
width: 'auto',
fontFamily: 'Roboto',
isDisabled: false,
padding: '0.8em 2.2em',
+ textAlign: 'center',
};
Button.displayName = 'Button';