diff --git a/src/components/base/CheckBox/index.js b/src/components/base/CheckBox/index.js index 5865639d..c2c7ed46 100644 --- a/src/components/base/CheckBox/index.js +++ b/src/components/base/CheckBox/index.js @@ -1,7 +1,6 @@ // @flow import React from 'react' -import noop from 'lodash/noop' import styled, { keyframes } from 'styled-components' import { Tabbable } from 'components/base/Box' @@ -54,14 +53,14 @@ type Props = { function CheckBox(props: Props) { const { isChecked, onChange, ...p } = props return ( - onChange(!isChecked)} {...p}> + onChange && onChange(!isChecked)} {...p}> {isChecked && } ) } CheckBox.defaultProps = { - onChange: noop, + onChange: null, } export default CheckBox diff --git a/src/components/base/Radio/index.js b/src/components/base/Radio/index.js index 9c74a08d..1c3e68fb 100644 --- a/src/components/base/Radio/index.js +++ b/src/components/base/Radio/index.js @@ -1,7 +1,6 @@ // @flow import React from 'react' -import noop from 'lodash/noop' import styled from 'styled-components' import { Tabbable } from 'components/base/Box' @@ -63,11 +62,11 @@ type Props = { function Radio(props: Props) { const { isChecked, onChange } = props - return onChange(!isChecked)} /> + return onChange && onChange(!isChecked)} /> } Radio.defaultProps = { - onChange: noop, + onChange: null, } export default Radio