Add all steps to their own file

This commit is contained in:
fragosti
2018-06-15 18:02:33 -07:00
parent 5993125cc7
commit 0cf9927132
11 changed files with 196 additions and 71 deletions

View File

@@ -5,15 +5,15 @@ import * as React from 'react';
export interface IconButtonProps {
iconName: string;
labelText?: string;
onClick: () => void;
onClick?: () => void;
color?: string;
display?: string;
}
interface IconButtonState {
isHovering: boolean;
}
export class IconButton extends React.Component<IconButtonProps, IconButtonState> {
public static defaultProps: Partial<IconButtonProps> = {
onClick: _.noop,
labelText: '',
color: colors.mediumBlue,
};
@@ -26,8 +26,9 @@ export class IconButton extends React.Component<IconButtonProps, IconButtonState
public render(): React.ReactNode {
const styles: Styles = {
root: {
cursor: 'pointer',
opacity: this.state.isHovering ? 0.5 : 1,
cursor: this.props.onClick ? 'pointer' : 'undefined',
opacity: this.state.isHovering && this.props.onClick ? 0.5 : 1,
display: this.props.display,
},
icon: {
color: this.props.color,