import React, { useMemo } from 'react'; import Wrap from '../wrap/Wrap'; import '../g.scss'; function LabelTitle(props: ILabelLabel) { const { title = 'label', attrKey, wrapStyle = { padding: '6px 20px 6px 20px' }, change, deleteText, style } = props; const Redio = useMemo(() => { return (
{title} {deleteText ? ( change('delPic', attrKey)} > 删除 ) : ( <> )}
); }, [title, deleteText]); return Redio; } export default LabelTitle; export interface ILabelLabel { title: string; attrKey: string; paddingSize?: string; wrapStyle?: React.CSSProperties; change?: Function; deleteText?: string; style?: React.CSSProperties; }