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,9 +1,8 @@
|
|||
import React, { useState } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import FormFieldBool from '../../.form/FormFieldBool'
|
||||
import OptionPreamble from '../OptionPreamble'
|
||||
|
||||
const PatternOptionBool = props => {
|
||||
const PatternOptionBool = (props) => {
|
||||
const [value, setValue] = useState(props.value === null ? props.dflt : props.value)
|
||||
const [expanded, setExpanded] = useState(false)
|
||||
|
||||
|
@ -62,18 +61,4 @@ const PatternOptionBool = props => {
|
|||
)
|
||||
}
|
||||
|
||||
PatternOptionBool.propTypes = {
|
||||
raiseEvent: PropTypes.func.isRequired,
|
||||
updateValue: PropTypes.func.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
dflt: PropTypes.oneOfType([
|
||||
PropTypes.number.isRequired,
|
||||
PropTypes.string.isRequired,
|
||||
PropTypes.bool.isRequired
|
||||
]),
|
||||
title: PropTypes.node.isRequired,
|
||||
desc: PropTypes.node.isRequired,
|
||||
labels: PropTypes.array.isRequired
|
||||
}
|
||||
|
||||
export default PatternOptionBool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue