mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
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
32 lines
948 B
JavaScript
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>
|
|
{info &&
|
|
<InfoTooltipWithTrigger
|
|
tooltip={info}
|
|
label="date-free-tooltip"
|
|
/>}
|
|
|
|
<i className={isSelected ? 'fa fa-check text-primary' : ''} />
|
|
</div>
|
|
<div className="m-t-5 m-l-5">
|
|
{children}
|
|
</div>
|
|
</div>);
|
|
}
|
|
PopoverSection.propTypes = propTypes;
|