Add Radio with popover
New commponent Radio with popover is required to show properly popover in DDF wizard
This commit is contained in:
parent
2d777bd30d
commit
0644cbd584
5 changed files with 70 additions and 39 deletions
|
|
@ -0,0 +1,19 @@
|
|||
import React, { useRef } from 'react';
|
||||
import Radio from '@data-driven-forms/pf4-component-mapper/radio';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const RadioWithPopover = ({ Popover, ...props }) => {
|
||||
const ref = useRef();
|
||||
return <>
|
||||
<Radio { ...props } label={ <span ref={ ref } className="ins-c-image--builder__popover">{props.label}
|
||||
<Popover appendTo={ ref.current } />
|
||||
</span> } />
|
||||
|
||||
</>;
|
||||
};
|
||||
|
||||
RadioWithPopover.propTypes = {
|
||||
Popover: PropTypes.elementType.isRequired,
|
||||
};
|
||||
|
||||
export default RadioWithPopover;
|
||||
Loading…
Add table
Add a link
Reference in a new issue