Skip to content

Commit

Permalink
Misc fixes to address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmarks committed Apr 11, 2016
1 parent d5b9918 commit 5d56544
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/Stepper/Step.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {Component, PropTypes} from 'react';
import React, {PropTypes} from 'react';

const getStyles = ({index}, {stepper}) => {
const {orientation} = stepper;
Expand All @@ -19,7 +19,7 @@ const getStyles = ({index}, {stepper}) => {
return styles;
};

export default class Step extends Component {
export default class Step extends React.Component {

static propTypes = {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Stepper/StepButton.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('<StepButton />', () => {
<StepButton style={{backgroundColor: 'purple'}}>Step One</StepButton>
);

assert.strictEqual(wrapper.props().style.backgroundColor, 'purple', );
assert.strictEqual(wrapper.props().style.backgroundColor, 'purple');
});

it('renders an EnhancedButton with a StepLabel', () => {
Expand Down
25 changes: 14 additions & 11 deletions src/Stepper/StepConnector.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
import React, {PropTypes} from 'react';
import pure from 'recompose/pure';

const propTypes = {
/**
* Override the inline-style of the root element.
*/
style: PropTypes.object,
};

const contextTypes = {
muiTheme: PropTypes.object.isRequired,
stepper: PropTypes.object,
};

const StepConnector = (props, context) => {
const {muiTheme, stepper} = context;

Expand Down Expand Up @@ -37,17 +49,8 @@ const StepConnector = (props, context) => {
);
};

StepConnector.propTypes = {
/**
* Override the inline-style of the root element.
*/
style: PropTypes.object,
};

StepConnector.contextTypes = {
muiTheme: PropTypes.object.isRequired,
stepper: PropTypes.object,
};
StepConnector.propTypes = propTypes;
StepConnector.contextTypes = contextTypes;

export {StepConnector as PlainStepConnector};
export default pure(StepConnector);
4 changes: 2 additions & 2 deletions src/Stepper/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export Stepper from './Stepper';
export Step from './Step';
export StepButton from './StepButton';
export StepLabel from './StepLabel';
export StepContent from './StepContent';
export StepLabel from './StepLabel';
export Stepper from './Stepper';
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export Slider from './Slider';
export Subheader from './Subheader';
export SvgIcon from './SvgIcon';
export Step from './Stepper/Step';
export StepButton from './Stepper/StepButton';
export StepContent from './Stepper/StepContent';
export StepLabel from './Stepper/StepLabel';
export Stepper from './Stepper/Stepper';
export Snackbar from './Snackbar';
export Tabs from './Tabs';
Expand Down
2 changes: 1 addition & 1 deletion src/internal/ExpandTransitionChild.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class ExpandTransitionChild extends React.Component {

const {prepareStyles} = this.context.muiTheme;

const mergedRootStyles = Object.assign({}, {
const mergedRootStyles = Object.assign({
position: 'relative',
height: 0,
width: '100%',
Expand Down

0 comments on commit 5d56544

Please sign in to comment.