small truncateFix

This commit is contained in:
Ruben Fiszel
2022-08-08 15:13:51 +02:00
parent 013540ac21
commit 0f53f58a66
2 changed files with 6 additions and 1 deletions

View File

@@ -266,6 +266,9 @@ export function truncate(s: string, n: number, suffix: string = '...'): string {
}
export function truncateRev(s: string, n: number, prefix: string = '...'): string {
if (!s) {
return prefix
}
if (s.length <= n) {
return s
} else {

View File

@@ -15,7 +15,9 @@ const config = {
'1/4': '25%',
'1/3': '33%',
'1/2': '50%',
'2/3': '66%'
'2/3': '66%',
'3/4': '75%'
},
minHeight: {
'1/2': '50vh'