/* jshint esversion: 6 */
import PropTypes from 'prop-types';
import Icons from './icons.js';
import capitalizeFirstLetter from './capitalize-first.js';
import { __ } from '@wordpress/i18n';
import { ButtonGroup, Dashicon, Tooltip, Button } from '@wordpress/components';
const { Component, Fragment } = wp.element;
class RadioIconComponent extends Component {
constructor() {
super( ...arguments );
let baseDefault = 'default';
this.defaultValue = this.props.default ? this.props.default : baseDefault;
this.state = {
value: this.props.value,
};
}
render() {
const controlLabel = (
{ this.props.label &&
this.props.label
}
);
return (
{ this.props.label && (
{ this.props.label }
) }
{ Object.keys( this.props.options ).map( ( item ) => {
return (
{ this.props.options[ item ].tooltip && (
) }
{ ! this.props.options[ item ].tooltip && (
) }
);
} )}
);
}
}
RadioIconComponent.propTypes = {
control: PropTypes.object.isRequired
};
export default RadioIconComponent;