Skip to content

Commit

Permalink
Use default value/destructuring for the input type instead of definin…
Browse files Browse the repository at this point in the history
…g a new constant.
  • Loading branch information
paulwilde authored and youknowriad committed Jun 13, 2017
1 parent 92eb395 commit a789640
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions blocks/inspector-controls/text-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import { withInstanceId } from 'components';
*/
import './style.scss';

function TextControl( { label, value, instanceId, onChange, ...props } ) {
function TextControl( { label, value, instanceId, onChange, type = 'text', ...props } ) {
const id = 'inspector-text-control-' + instanceId;
const type = props.type || 'text';
const onChangeValue = ( event ) => onChange( event.target.value );

return (
Expand Down

0 comments on commit a789640

Please sign in to comment.