1
0
Fork 0

refactor(components): Removed prop-types dependency

This commit is contained in:
Joost De Cock 2020-04-25 19:09:02 +02:00
parent 8cf8424437
commit cda9b03713
44 changed files with 559 additions and 1026 deletions

View file

@ -1,9 +1,8 @@
import React, { useState } from 'react'
import PropTypes from 'prop-types'
import FormFieldList from '../../.form/FormFieldList'
import OptionPreamble from '../OptionPreamble'
const PatternOptionList = props => {
const PatternOptionList = (props) => {
const [value, setValue] = useState(props.dflt)
const [expanded, setExpanded] = useState(false)
@ -70,13 +69,4 @@ const PatternOptionList = props => {
)
}
PatternOptionList.propTypes = {
updateValue: PropTypes.func.isRequired,
name: PropTypes.string.isRequired,
dflt: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.string.isRequired]),
title: PropTypes.node.isRequired,
desc: PropTypes.node.isRequired,
list: PropTypes.array.isRequired
}
export default PatternOptionList