22 createContext , forwardRef , memo , useCallback , useContext , useEffect , useLayoutEffect , useRef , useState ,
33} from 'react' ;
44import { createPortal } from 'react-dom' ;
5- import PropTypes from 'prop-types' ;
65import { flip , shift , size , useFloating } from '@floating-ui/react-dom' ;
76import cx from 'classnames' ;
87
@@ -165,19 +164,6 @@ export const Dropdown = memo(props => {
165164
166165Dropdown . displayName = 'Dropdown' ;
167166
168- Dropdown . propTypes = {
169- children : PropTypes . node ,
170- className : PropTypes . string ,
171- disabled : PropTypes . bool ,
172- isOpen : PropTypes . bool ,
173- maxHeight : PropTypes . oneOfType ( [ PropTypes . number , PropTypes . bool ] ) ,
174- modifiers : PropTypes . oneOfType ( [ PropTypes . arrayOf ( PropTypes . object ) , PropTypes . object ] ) ,
175- onToggle : PropTypes . func ,
176- portal : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . object ] ) ,
177- placement : PropTypes . string ,
178- strategy : PropTypes . oneOf ( [ 'absolute' , 'fixed' ] )
179- } ;
180-
181167export const DropdownToggle = memo ( forwardRef ( ( props , ref ) => {
182168 const { className, tabIndex, title, onKeyDown, onClick, ...rest } = props ;
183169 const Tag = props . tag || Button ;
@@ -222,16 +208,6 @@ export const DropdownToggle = memo(forwardRef((props, ref) => {
222208
223209DropdownToggle . displayName = 'DropdownToggle' ;
224210
225- DropdownToggle . propTypes = {
226- tag : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . string ] ) ,
227- children : PropTypes . node ,
228- className : PropTypes . string ,
229- onClick : PropTypes . func ,
230- onKeyDown : PropTypes . func ,
231- tabIndex : PropTypes . number ,
232- title : PropTypes . string ,
233- } ;
234-
235211export const DropdownMenu = memo ( props => {
236212 const { className, onKeyDown : onKeyDownProp , ...rest } = props ;
237213 const ref = useRef ( null ) ;
@@ -309,16 +285,6 @@ export const DropdownMenu = memo(props => {
309285
310286DropdownMenu . displayName = 'DropdownMenu' ;
311287
312- DropdownMenu . propTypes = {
313- children : PropTypes . node ,
314- className : PropTypes . string ,
315- isOpen : PropTypes . bool ,
316- keepOpenOnInteraction : PropTypes . bool ,
317- onKeyDown : PropTypes . func ,
318- right : PropTypes . bool ,
319- tabIndex : PropTypes . string
320- } ;
321-
322288export const DropdownItem = memo ( props => {
323289 const ref = useRef ( null ) ;
324290 const { children, className, onClick, disabled = false , role = 'menuitem' , tag, divider, ...rest } = props ;
@@ -379,16 +345,6 @@ export const DropdownItem = memo(props => {
379345
380346DropdownItem . displayName = 'DropdownItem' ;
381347
382- DropdownItem . propTypes = {
383- disabled : PropTypes . bool ,
384- divider : PropTypes . bool ,
385- role : PropTypes . string ,
386- children : PropTypes . node ,
387- className : PropTypes . string ,
388- onClick : PropTypes . func ,
389- tag : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . string ] ) ,
390- } ;
391-
392348export const UncontrolledDropdown = memo ( props => {
393349 const [ isOpen , setIsOpen ] = useState ( false ) ;
394350
@@ -409,7 +365,3 @@ export const UncontrolledDropdown = memo(props => {
409365
410366UncontrolledDropdown . displayName = 'UncontrolledDropdown' ;
411367
412- UncontrolledDropdown . propTypes = {
413- children : PropTypes . node ,
414- }
415-
0 commit comments