diff options
author | Brandon Millman <brandon@0xproject.com> | 2019-01-08 04:41:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-08 04:41:10 +0800 |
commit | 17f087870781e3b89fa9a63c81c9f41bb6bc9bf8 (patch) | |
tree | 1fbeb09a27cbde3dbaeb67c3240e3433ad66580d /packages/website/ts/components/button.tsx | |
parent | 3cdb85606a6904370e26ae883559631350f8bd82 (diff) | |
parent | e4bb6a4652a202d38308ec705144dc07833e9d36 (diff) | |
download | dexon-sol-tools-17f087870781e3b89fa9a63c81c9f41bb6bc9bf8.tar dexon-sol-tools-17f087870781e3b89fa9a63c81c9f41bb6bc9bf8.tar.gz dexon-sol-tools-17f087870781e3b89fa9a63c81c9f41bb6bc9bf8.tar.bz2 dexon-sol-tools-17f087870781e3b89fa9a63c81c9f41bb6bc9bf8.tar.lz dexon-sol-tools-17f087870781e3b89fa9a63c81c9f41bb6bc9bf8.tar.xz dexon-sol-tools-17f087870781e3b89fa9a63c81c9f41bb6bc9bf8.tar.zst dexon-sol-tools-17f087870781e3b89fa9a63c81c9f41bb6bc9bf8.zip |
Merge pull request #1487 from 0xProject/feature/website/market-maker-page
[website] Add market making grant program page
Diffstat (limited to 'packages/website/ts/components/button.tsx')
-rw-r--r-- | packages/website/ts/components/button.tsx | 9 |
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'}; |