antv-l7/site/components/DipperMap/index.tsx

44 lines
1.1 KiB
TypeScript
Raw Normal View History

// eslint-disable-next-line no-unused-vars
import { Carousel } from 'antd';
import React from 'react';
import '../../css/dippermap.css';
interface DipperMapProps {
dippermap: {
desc: string;
img: string;
alt: string
}[]
}
export function DipperMap(props: DipperMapProps) {
const { dippermap } = props;
const jumpDipperMap = (url: string) => {
window.open(url, '_blank');
};
return (
<div className='dippermapcontainer'>
<div className='title'>Dipper Map </div>
<div className='subtitle'>DipperMap L7 </div>
<div className='carousel'>
<Carousel
autoplay
effect='fade'
dotPosition='right'
>
{dippermap.map(item => {
return (
<div>
<h3 style={{ textAlign: 'center' }}>{item.desc}</h3>
<img key={item.alt} alt={item.alt} src={item.img} />
</div>
);
})}
</Carousel>
</div>
</div>
);
}