aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/button.tsx
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2019-01-07 13:35:05 +0800
committerBrandon Millman <brandon.millman@gmail.com>2019-01-07 13:40:14 +0800
commit59ec243c2678cca2d2170e49a235f00102b14f96 (patch)
tree8458a3ec990b2a85b10921aa4aa1c5da284bb2b2 /packages/website/ts/components/button.tsx
parent5e8da70eae3aab86f194a28ee2ecca3368918db2 (diff)
downloaddexon-sol-tools-59ec243c2678cca2d2170e49a235f00102b14f96.tar
dexon-sol-tools-59ec243c2678cca2d2170e49a235f00102b14f96.tar.gz
dexon-sol-tools-59ec243c2678cca2d2170e49a235f00102b14f96.tar.bz2
dexon-sol-tools-59ec243c2678cca2d2170e49a235f00102b14f96.tar.lz
dexon-sol-tools-59ec243c2678cca2d2170e49a235f00102b14f96.tar.xz
dexon-sol-tools-59ec243c2678cca2d2170e49a235f00102b14f96.tar.zst
dexon-sol-tools-59ec243c2678cca2d2170e49a235f00102b14f96.zip
feat(website): add contact us hero action to market maker page
Diffstat (limited to 'packages/website/ts/components/button.tsx')
-rw-r--r--packages/website/ts/components/button.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/website/ts/components/button.tsx b/packages/website/ts/components/button.tsx
index c9785e48c..569038ae0 100644
--- a/packages/website/ts/components/button.tsx
+++ b/packages/website/ts/components/button.tsx
@@ -8,6 +8,7 @@ import { colors } from 'ts/style/colors';
interface ButtonInterface {
bgColor?: string;
+ borderColor?: string;
color?: string;
children?: React.ReactNode | string;
isTransparent?: boolean;
@@ -26,7 +27,7 @@ interface ButtonInterface {
shouldUseAnchorTag?: boolean;
}
-export const Button = (props: ButtonInterface) => {
+export const Button: React.StatelessComponent<ButtonInterface> = (props: ButtonInterface) => {
const { children, href, isWithArrow, to, shouldUseAnchorTag, target } = props;
let linkElem;
@@ -53,6 +54,10 @@ export const Button = (props: ButtonInterface) => {
);
};
+Button.defaultProps = {
+ borderColor: 'rgba(255, 255, 255, .4)',
+};
+
const ButtonBase =
styled.button <
ButtonInterface >
@@ -62,7 +67,7 @@ const ButtonBase =
display: inline-block;
background-color: ${props => props.bgColor || colors.brandLight};
background-color: ${props => (props.isTransparent || props.isWithArrow) && 'transparent'};
- border-color: ${props => props.isTransparent && !props.isWithArrow && 'rgba(255, 255, 255, .4)'};
+ border-color: ${props => props.isTransparent && !props.isWithArrow && props.borderColor};
color: ${props => (props.isAccentColor ? props.theme.linkColor : props.color || props.theme.textColor)};
padding: ${props => !props.isNoPadding && !props.isWithArrow && '18px 30px'};
white-space: ${props => props.isWithArrow && 'nowrap'};