11import React , { Component } from 'react' ;
2- import _ from 'lodash' ;
2+ import { isEqual , startCase , camelCase } from 'lodash' ;
33import PropTypes from 'prop-types' ;
44import FormLabel from '@material-ui/core/FormLabel' ;
55import MenuItem from '@material-ui/core/MenuItem' ;
66import FormControl from '@material-ui/core/FormControl' ;
77import Select from '@material-ui/core/Select' ;
88import Tooltip from '@material-ui/core/Tooltip' ;
9- import primitives from 'basicprimitives' ;
9+ import { Thickness } from 'basicprimitives' ;
1010
1111class ThicknessOption extends Component {
1212 static propTypes = {
@@ -26,12 +26,12 @@ class ThicknessOption extends Component {
2626 const nextOptions = this . getUsedOptions ( nextProps ) ;
2727 const currentOptions = this . getUsedOptions ( this . props ) ;
2828
29- return ! _ . isEqual ( currentOptions , nextOptions ) ;
29+ return ! isEqual ( currentOptions , nextOptions ) ;
3030 }
3131
3232 onPropertyChange ( propertyName , propertyValue ) {
3333 const { onChange, value } = this . props ;
34- const result = new primitives . common . Thickness ( value ) ;
34+ const result = new Thickness ( value ) ;
3535 result [ propertyName ] = propertyValue ;
3636 onChange ( result ) ;
3737 }
@@ -58,7 +58,7 @@ class ThicknessOption extends Component {
5858 </ Tooltip >
5959 { names . map ( name => {
6060 return < FormControl className = { 'option-panel-item' } key = { `${ propertyName } -${ name } ` } >
61- < FormLabel key = { `${ propertyName } -${ name } -label` } id = { `${ propertyName } -${ name } -label` } > { _ . startCase ( _ . camelCase ( name ) ) } </ FormLabel >
61+ < FormLabel key = { `${ propertyName } -${ name } -label` } id = { `${ propertyName } -${ name } -label` } > { startCase ( camelCase ( name ) ) } </ FormLabel >
6262 < Select
6363 labelId = { `${ propertyName } -${ name } -label` }
6464 key = { `${ propertyName } -${ name } ` }
0 commit comments