debian-image-builder-frontend/src/Components/CreateImageWizard/formComponents/RadioWithPopover.js
regexowl ab1a7f4aab ESLint: Use --fix with updated rules to order imports
This applies the updated sorting rules to the files by running `npm run lint:js:fix`
2022-12-02 16:29:58 +01:00

26 lines
566 B
JavaScript

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 />
</span>
}
/>
);
};
RadioWithPopover.propTypes = {
Popover: PropTypes.elementType.isRequired,
label: PropTypes.node,
};
export default RadioWithPopover;