type AbbrProps = { children: string maxLen?: number } export function Abbr({ children, maxLen = 30, ...props }: AbbrProps) { if (children.length <= maxLen) { return {children} } return ( {children.substring(0, maxLen).concat('...')} ) }