Repository: react-materialize/react-materialize (js)

Issue:
TimePicker does not work in 3.0
### Description

TimePicker does not import on the 3.0 beta branch.

### Steps to Reproduce

`import { TimePicker } from 'react-materialize';`

Looks like index.js is missing `import TimePicker from './TimePicker';`

This component is also affected by the onChange callback issue in TextInput. Side note, it would be nice to get the time picker instance from outside this component to access all of the time instance variables like amOrPm, hours, and minutes - so we don't have to parse the time value.

**Expected behavior:** Import to resolve

**Actual behavior:** Import does not resolve

### Versions

**react-materialize:** 3.0.0
**materialize-css:** 1.0.0
**react:** 16.4.1


Pull request description:
3.0.0 fix text input events
Fixes #759 

Patch:
diff --git a/src/DatePicker.js b/src/DatePicker.js
index b6c6403..b990e38 100644
--- a/src/DatePicker.js
+++ b/src/DatePicker.js
@@ -25,13 +25,25 @@ class DatePicker extends React.Component {
   }
 
   render() {
-    const { id, ...other } = this.props;
+    const { id, onChange, ...other } = this.props;
+    const onSelect = onChange;
 
-    return <TextInput id={this.id} inputClassName="datepicker" {...other} />;
+    return (
+      <TextInput
+        id={this.id}
+        inputClassName="datepicker"
+        onSelect={onSelect}
+        {...other}
+      />
+    );
   }
 }
 
 DatePicker.propTypes = {
+  /**
+   * Event called when Time has been selected
+   */
+  onChange: PropTypes.func,
   /**
    * id passed to datepicker, also used for init method
    */
diff --git a/src/Icon.js b/src/Icon.js
index 98191a3..ec6f6e7 100644
--- a/src/Icon.js
+++ b/src/Icon.js
@@ -28,7 +28,7 @@ Icon.propTypes = {
   /*
    * Icon type: <a href='https://material.io/icons/'>https://material.io/icons/</a>
    */
-  children: PropTypes.string.isRequired,
+  children: PropTypes.string,
   /*
    * Placement for icon if used beside a text ↓
    */
diff --git a/src/TextInput.js b/src/TextInput.js
index 8c64784..cbcbeb2 100644
--- a/src/TextInput.js
+++ b/src/TextInput.js
@@ -45,7 +45,8 @@ class TextInput extends Component {
       email,
       validate,
       value,
-      type
+      type,
+      ...other
     } = this.props;
 
     const sizes = { s, m, l, xl };
@@ -76,7 +77,8 @@ class TextInput extends Component {
       type: computedType,
       id: this.id,
       defaultValue: value,
-      disabled
+      disabled,
+      ...other
     };
 
     const renderLabel = () =>
@@ -110,7 +112,6 @@ class TextInput extends Component {
           ref={el => {
             this.inputRef = el;
           }}
-          onChange={this.handleChange}
           className={cx({ validate }, inputClassName)}
           {...inputProps}
         />
diff --git a/src/TimePicker.js b/src/TimePicker.js
index 72363d0..3987fe1 100644
--- a/src/TimePicker.js
+++ b/src/TimePicker.js
@@ -25,13 +25,25 @@ class TimePicker extends React.Component {
   }
 
   render() {
-    const { id, ...other } = this.props;
+    const { id, onChange, ...other } = this.props;
+    const onSelect = onChange;
 
-    return <TextInput id={this.id} inputClassName="timepicker" {...other} />;
+    return (
+      <TextInput
+        id={this.id}
+        inputClassName="timepicker"
+        onSelect={onSelect}
+        {...other}
+      />
+    );
   }
 }
 
 TimePicker.propTypes = {
+  /**
+   * Event called when Time has been selected
+   */
+  onChange: PropTypes.func,
   /**
    * id passed to Timepicker, also used for init method
    */
diff --git a/stories/Icon.stories.js b/stories/Icon.stories.js
deleted file mode 100644
index 537dde1..0000000
--- a/stories/Icon.stories.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import React from 'react';
-import { storiesOf } from '@storybook/react';
-import Icon from '../src/Icon';
-
-const stories = storiesOf('components/Icons', module);
-
-stories.addParameters({
-  info: {
-    text: `We have included 740 Material Design Icons courtesy of Google. You can download them directly from the Material Design specs.`
-  }
-});
-
-stories.add('Default', () => <Icon>cloud</Icon>);
-stories.add('Tiny', () => <Icon tiny>cloud</Icon>);
-stories.add('Small', () => <Icon small>cloud</Icon>);
-stories.add('Medium', () => <Icon medium>cloud</Icon>);
-stories.add('Large', () => <Icon large>cloud</Icon>);


Test patch:
diff --git a/test/TextInput.spec.js b/test/TextInput.spec.js
index 8d4eea9..3e9ef4e 100644
--- a/test/TextInput.spec.js
+++ b/test/TextInput.spec.js
@@ -52,4 +52,12 @@ describe('<TextInput />', () => {
     wrapper = shallow(<TextInput icon="cloud" />);
     expect(wrapper.find('i.material-icons.prefix')).toHaveLength(1);
   });
+
+  test('handles other props', () => {
+    const mockOnChange = jest.fn();
+    wrapper = shallow(<TextInput onChange={mockOnChange} />);
+    wrapper.find('input').simulate('change', { target: { value: '7' } });
+
+    expect(mockOnChange).toHaveBeenCalledTimes(1);
+  });
 });