Skip to content

Instantly share code, notes, and snippets.

@tdreyno
Created February 8, 2017 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdreyno/b167b50b54ccacbf62af1e075299d990 to your computer and use it in GitHub Desktop.
Save tdreyno/b167b50b54ccacbf62af1e075299d990 to your computer and use it in GitHub Desktop.
import React from 'react';
import { stylesheet, css } from '../../util';
import {
MEDIUM_COLOR,
LIGHT_PRIMARY_TEXT_COLOR,
BUTTON_LINK_TYPE,
LIGHT_COLOR,
} from '../../styles';
const STYLES = stylesheet({
button: {
...BUTTON_LINK_TYPE,
background: MEDIUM_COLOR,
border: 0,
borderRadius: '3px',
color: LIGHT_PRIMARY_TEXT_COLOR,
cursor: 'pointer',
padding: '16px 34px 14px 34px',
':focus': {
outline: 'none',
background: LIGHT_COLOR,
},
},
});
export interface IButtonProps {
label: string;
onClick?(e: React.MouseEvent<any>): any;
}
export class Button extends React.PureComponent<IButtonProps, void> {
render() {
const {
label,
onClick,
} = this.props;
return (
<button key={label} {...css(STYLES.button)} onClick={onClick}>{label}</button>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment