Files
superset2/superset/assets/javascripts/components/PopoverSection.jsx
Maxime Beauchemin ec752b1378 [geo] provide more flexible Spatial controls (#4032)
Before this PR the only way to query lat/long is in the shape of 2
columns that contains lat and long.

Now we're adding 2 more options:
* a single column that has lat and long with a delimiter in between
* support for geohashes - geohashes are cool
2017-12-15 11:47:27 -08:00

32 lines
948 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import InfoTooltipWithTrigger from './InfoTooltipWithTrigger';
const propTypes = {
title: PropTypes.string.isRequired,
isSelected: PropTypes.bool.isRequired,
onSelect: PropTypes.func.isRequired,
info: PropTypes.string,
children: PropTypes.node.isRequired,
};
export default function PopoverSection({ title, isSelected, children, onSelect, info }) {
return (
<div className={'PopoverSection ' + (!isSelected ? 'dimmed' : '')}>
<div onClick={onSelect} className="pointer">
<strong>{title}</strong> &nbsp;
{info &&
<InfoTooltipWithTrigger
tooltip={info}
label="date-free-tooltip"
/>}
&nbsp;
<i className={isSelected ? 'fa fa-check text-primary' : ''} />
</div>
<div className="m-t-5 m-l-5">
{children}
</div>
</div>);
}
PopoverSection.propTypes = propTypes;