diff --git a/src/components/MeasureHeight.jsx b/src/components/MeasureHeight.jsx index ba041c5..5887b2b 100644 --- a/src/components/MeasureHeight.jsx +++ b/src/components/MeasureHeight.jsx @@ -1,6 +1,8 @@ import React, { Component, PropTypes } from 'react'; import ReactDOM from 'react-dom'; +import { omit } from 'functions'; + /** * MeasureHeight is a component that allows you to measure the height of elements wrapped. * @@ -47,7 +49,9 @@ export default class MeasureHeight extends Component { } render() { - return
; + const props = omit(this.props, Object.keys(MeasureHeight.propTypes)); + + return ; } measure() { diff --git a/src/components/ui/form/Button.jsx b/src/components/ui/form/Button.jsx index 67e99f2..449d30a 100644 --- a/src/components/ui/form/Button.jsx +++ b/src/components/ui/form/Button.jsx @@ -4,6 +4,7 @@ import classNames from 'classnames'; import buttons from 'components/ui/buttons.scss'; import { colors, COLOR_GREEN } from 'components/ui'; +import { omit } from 'functions'; import FormComponent from './FormComponent'; @@ -28,18 +29,18 @@ export default class Button extends FormComponent { render() { const { color, block, small } = this.props; - const props = { - ...this.props - }; + const props = omit(this.props, Object.keys(Button.propTypes)); - props.label = this.formatMessage(props.label); + const label = this.formatMessage(this.props.label); return ( ); } diff --git a/src/components/ui/form/Checkbox.jsx b/src/components/ui/form/Checkbox.jsx index 1d275a5..364046c 100644 --- a/src/components/ui/form/Checkbox.jsx +++ b/src/components/ui/form/Checkbox.jsx @@ -3,6 +3,7 @@ import React, { PropTypes } from 'react'; import classNames from 'classnames'; import { colors, skins, SKIN_DARK, COLOR_GREEN } from 'components/ui'; +import { omit } from 'functions'; import styles from './form.scss'; import FormInputComponent from './FormInputComponent'; @@ -32,10 +33,12 @@ export default class Checkbox extends FormInputComponent { label = this.formatMessage(label); + const props = omit(this.props, Object.keys(Checkbox.propTypes)); + return (