|
- import classNames from 'classnames';
- import React from 'react';
- import { BasicInfoItem } from './components';
- import './index.less';
- import type { BasicInfoData, BasicInfoLink } from './types';
- export * from './format';
- export type { BasicInfoData, BasicInfoLink };
-
- type BasicInfoProps = {
- datas: BasicInfoData[];
- className?: string;
- style?: React.CSSProperties;
- labelWidth: number;
- };
-
- export default function BasicInfo({ datas, className, style, labelWidth }: BasicInfoProps) {
- return (
- <div className={classNames('kf-basic-info', className)} style={style}>
- {datas.map((item) => (
- <BasicInfoItem
- key={item.label}
- data={item}
- labelWidth={labelWidth}
- classPrefix="kf-basic-info"
- />
- ))}
- </div>
- );
- }
|