import React from 'react';
import { View } from '@tarojs/components';
import {CompDefault, MetaProps} from "../data-channel";
import connect from '../connect';

export interface Props extends MetaProps {
  /** 样式类型 todo 这个考虑去了 */
  styleType?: 'soft' | 'sharp';
  /** 标题块 */
  title?: JSX.Element | string;
  /** 信息块列表 */
  blocks: JSX.Element[];
}

export interface State {}

const defaultValue: CompDefault<Props, State> = {
  props: {
    blocks: []
  },
  state: {},
  meta: {
    compName: 'infoFlow:信息流',
  },
}


/**
 * 页面-信息流页
 */
const PageFlow: React.FC<Props> = ({ title, blocks }) => {
  return (
    <View className='wm-info-flow'>
      {blocks}
    </View>
  );
};

export default connect(PageFlow, defaultValue);
