import React from 'react'; import Wrap from '../wrap/Wrap'; import { returnClass } from '../unit'; function LabelTexts(props: IProps) { const { title = 'lable', change, list = [], paddingSize = 'normal', wrapStyle = { padding: '6px 20px 6px 20px' } } = props; return (
{title}
{Array.isArray(list) && list?.length > 0 && list?.map((item) => { return ( { change(item?.key); }} > {item?.title} ); })}
); } export default LabelTexts; export interface IProps { title: string; change: Function; list: IList; paddingSize: string; wrapStyle: React.CSSProperties; } export interface IList { key: string; title: string; }