refactor(components): Removed prop-types dependency
This commit is contained in:
parent
8cf8424437
commit
cda9b03713
44 changed files with 559 additions and 1026 deletions
|
@ -1,5 +1,4 @@
|
|||
import React, { useState } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import Draft from '../../Draft'
|
||||
import Zoombox from '../Zoombox'
|
||||
import Design from '../Design'
|
||||
|
@ -115,7 +114,7 @@ const DraftPattern = (props) => {
|
|||
|
||||
return (
|
||||
<div className="fs-sa">
|
||||
<section>
|
||||
<section style={{ margin: '1rem' }}>
|
||||
<Draft
|
||||
{...patternProps}
|
||||
design={design}
|
||||
|
@ -224,7 +223,7 @@ const DraftPattern = (props) => {
|
|||
updatePatternData={props.updateGist}
|
||||
raiseEvent={props.raiseEvent}
|
||||
freesewing={props.freesewing}
|
||||
units={props.units}
|
||||
units={props.units || 'metric'}
|
||||
/>
|
||||
</div>
|
||||
</aside>
|
||||
|
@ -232,18 +231,4 @@ const DraftPattern = (props) => {
|
|||
)
|
||||
}
|
||||
|
||||
DraftPattern.propTypes = {
|
||||
gist: PropTypes.object.isRequired,
|
||||
updateGist: PropTypes.func.isRequired,
|
||||
config: PropTypes.object.isRequired,
|
||||
raiseEvent: PropTypes.func.isRequired,
|
||||
Pattern: PropTypes.func.isRequired,
|
||||
units: PropTypes.oneOf(['metric', 'imperial'])
|
||||
}
|
||||
|
||||
DraftPattern.defaultProps = {
|
||||
units: 'metric',
|
||||
pointInfo: null
|
||||
}
|
||||
|
||||
export default DraftPattern
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue