Skip to content

Commit

Permalink
Make Icon pure
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Nov 15, 2018
1 parent 520c3e1 commit be0cc4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/components/src/color-picker/inputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { speak } from '@wordpress/a11y';
import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { DOWN, ENTER, UP } from '@wordpress/keycodes';
import { pure } from '@wordpress/compose';

/**
* Internal dependencies
Expand Down Expand Up @@ -77,6 +78,8 @@ export class Input extends Component {
}
}

const PureIconButton = pure( IconButton );

export class Inputs extends Component {
constructor( { hsl } ) {
super( ...arguments );
Expand Down Expand Up @@ -277,7 +280,7 @@ export class Inputs extends Component {
<div className="components-color-picker__inputs-wrapper">
{ this.renderFields() }
<div className="components-color-picker__inputs-toggle">
<IconButton
<PureIconButton
icon="arrow-down-alt2"
label={ __( 'Change color format' ) }
onClick={ this.toggleViews }
Expand Down

0 comments on commit be0cc4f

Please sign in to comment.