v3: localization fixes, char counters & limits on all text fields, ux fixes
This commit is contained in:
5
src/utils/charCount.ts
Normal file
5
src/utils/charCount.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export function charCountClass(len: number, max: number): string {
|
||||
if (len >= max) return " text-editor-count--danger";
|
||||
if (len >= max * 0.85) return " text-editor-count--warn";
|
||||
return "";
|
||||
}
|
||||
Reference in New Issue
Block a user