1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Card, ListGroup } from 'react-bootstrap';
4 import { Link } from 'react-router-dom';
6 import ZeldaIcon from '../common/ZeldaIcon';
14 } from '../../helpers/Technique';
15 import i18n from '../../i18n';
17 const Popover = ({ show, technique }) =>
18 <div className={`map-popover ${show ? 'shown' : 'hidden'}`}>
22 {getTranslation(technique, 'title', i18n.language)}
28 {getTranslation(technique, 'short', i18n.language)}
32 {hasRelations(technique, 'related') ?
33 <ListGroup variant="flush">
34 {sorted(getRelations(technique, 'related')).map(r =>
37 title={getTranslation(r, 'short', i18n.language)}
39 <Link to={getLink(r)}>
41 <span className="tech-title-icons">
42 {r.title_icons.map(icon =>
43 <ZeldaIcon key={icon} name={icon} />
47 {getTranslation(r, 'title', i18n.language)}
58 technique: PropTypes.shape({
59 short: PropTypes.string,
63 export default Popover;