refactor(ui): implement dedicated package @page-agent/ui
This commit is contained in:
6
packages/ui/src/utils.ts
Normal file
6
packages/ui/src/utils.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export function truncate(text: string, maxLength: number): string {
|
||||
if (text.length > maxLength) {
|
||||
return text.substring(0, maxLength) + '...'
|
||||
}
|
||||
return text
|
||||
}
|
||||
Reference in New Issue
Block a user