You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tsx 787 B

1234567891011121314151617181920212223242526272829
  1. import classNames from 'classnames';
  2. import React from 'react';
  3. import { BasicInfoItem } from './components';
  4. import './index.less';
  5. import type { BasicInfoData, BasicInfoLink } from './types';
  6. export * from './format';
  7. export type { BasicInfoData, BasicInfoLink };
  8. type BasicInfoProps = {
  9. datas: BasicInfoData[];
  10. className?: string;
  11. style?: React.CSSProperties;
  12. labelWidth: number;
  13. };
  14. export default function BasicInfo({ datas, className, style, labelWidth }: BasicInfoProps) {
  15. return (
  16. <div className={classNames('kf-basic-info', className)} style={style}>
  17. {datas.map((item) => (
  18. <BasicInfoItem
  19. key={item.label}
  20. data={item}
  21. labelWidth={labelWidth}
  22. classPrefix="kf-basic-info"
  23. />
  24. ))}
  25. </div>
  26. );
  27. }