Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{...adapterProps}
/>
{props.children}
{props.content}
)}
);
}
FlyoutAdapter.propTypes = {
anchorPoint: PropTypes.oneOf(VanillaFlyout.AvailableAnchorPoints),
onClickOutside: PropTypes.func,
onScroll: PropTypes.func,
open: PropTypes.bool,
content: PropTypes.node,
children: PropTypes.node,
maxHeight: PropTypes.number
};
FlyoutAdapter.defaultProps = {
anchorPoint: undefined,
onClickOutside: () => {},
onScroll: () => {},
open: undefined,
content: undefined,
children: undefined
};
open={this.state.open}
onClickOutside={this.closeFlyout}
content={this.props.content}
maxHeight={this.props.maxHeight}
>
{target}
);
}
}
Flyout.propTypes = {
/**
* Where the flyout will be anchored relative to target
*/
anchorPoint: PropTypes.oneOf(VanillaFlyout.AvailableAnchorPoints),
/**
* Target component to open the flyout
*/
children: PropTypes.node,
/**
* Content for the flyout
*/
content: PropTypes.node,
/**
* Max height of the flyout content, in pixels
*/
maxHeight: PropTypes.number
};