blob: 79083e4034738d5b0f0da9fbdaea092a9b377718 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/**
*
* Button.js
*
* A common button, if you pass it a prop "route" it'll render a link to a react-router route
* otherwise it'll render a link with an onclick
*/
import React from 'react';
import styled from 'styled-components';
import { clickableStyle } from '@/utils/styles';
const StyledButton = styled.button`
position: relative;
padding: 10px 20px;
border-radius: 3px;
user-select: none;
font-size: 12px;
outline: 0;
border: 1px solid #5E6C75;
color: #122028;
${clickableStyle}
`;
type ButtonProps = {
className: String,
onClick: Function,
children: any,
isDisabled: Boolean,
};
const Button = ({ className, onClick, children, isDisabled }: ButtonProps) => (
<StyledButton
isDisabled={isDisabled}
className={className}
onClick={onClick}
>
{children}
</StyledButton>
);
export default Button;
|