Skip to content

Commit

Permalink
remove isValidHex validation from Swatches (#688)
Browse files Browse the repository at this point in the history
* remove isvalidhex validation from Swatches

Changes `Swatches` to be consistent with functionality `Github` and `Circle`

* remove unused color helper
  • Loading branch information
kriscarle authored May 4, 2020
1 parent deb6ea0 commit 5e7a346
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/swatches/Swatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import map from 'lodash/map'
import merge from 'lodash/merge'
import color from '../../helpers/color'
import * as material from 'material-colors'

import { ColorWrap, Raised } from '../common'
Expand All @@ -30,12 +29,7 @@ export const Swatches = ({ width, height, onChange, onSwatchHover, colors, hex,
},
}, passedStyles))

const handleChange = (data, e) => {
color.isValidHex(data) && onChange({
hex: data,
source: 'hex',
}, e)
}
const handleChange = (data, e) => onChange({ hex: data, source: 'hex' }, e)

return (
<div style={ styles.picker } className={ `swatches-picker ${ className }` }>
Expand Down

0 comments on commit 5e7a346

Please sign in to comment.