import QueueAnim from 'rc-queue-anim'; import React from 'react'; import SRank from './styled'; interface EventListProps { size?: Record; [key: string]: any; } export default function EventList(props: EventListProps) { const { data = [], count = 3, size, textStyle, background, marginBottom = 1, firstRowColor, } = props; const height = (size && size.height) || 200; const width = (size && size.width) || 300; function getRowBg(i: number) { if (i === 0 && firstRowColor) { return firstRowColor; } else { return background; } } return ( {data .slice(0, count) .map((item: Record, index: number) => (
{item.label}
{item.value}
))}
); } EventList.themeUpdate = function(params: any) { return { firstRowColor: params.primaryColor, background: params.secondColor, }; };