import * as React from 'react' interface TruncateProps { length: number children: string } export const Truncate = ({ length, children }: TruncateProps) => children.length > length - 1 ? ( {children.slice(0, length - 1)}… ) : ( <> {children} )