UNPKG

terra-date-picker

Version:

The terra-date-picker component provides users a way to enter or select a date from the date picker.

43 lines (37 loc) 877 B
import React from 'react'; import PropTypes from 'prop-types'; const propTypes = { /** * Prop to determine whether or not the container height is bounded. */ isHeightBounded: PropTypes.bool, /** * Prop to determine whether or not the container width is bounded. */ isWidthBounded: PropTypes.bool, /** * A callback function to execute when a key is pressed. */ onKeyDown: PropTypes.func, /** * Components to be included in the popup container. */ children: PropTypes.node, } const defaultProps = { isHeightBounded: false, isWidthBounded: false, } const PopupContent = React.forwardRef((props, ref) => { return ( <div ref={ref} onKeyDown={props.onKeyDown} > {props.children} </div> ); }); PopupContent.propTypes = propTypes; PopupContent.defaultProps = defaultProps; export default PopupContent;